I have an app on mobile devices who connects to my server app in desktops I use TcpListener on my desktop and TcpClient on mobiles. I tried to add support for Windows 8 but it seems Microsoft removed it and now we should use StreamSocket as TcpClient and StreamSocketListener as TcpListener. I tried to change my code but it is not even connecting to my TcpListener. (Note that I used asynchronous on desktops as well).
TcpListener on my desktop:
server = new TcpListener(Constants.DEFAULT_PORT);
server.Start();
server.BeginAcceptSocket(new AsyncCallback(OnAccept), null);
StreamSocket on my Windows 8:
var client = new StreamSocket();
await client.ConnectAsync(new EndpointPair(new HostName("localhost"), "7800", new HostName("localhost"), "7800"));
It passes the ConnectAsync line without being connected because my OnAccept on the desktop is not called.
So I don't know whats wrong here.