ok, I've changed the server a bit. Now it's code is:
Code:
IPEndPoint iep = new IPEndPoint(IPAddress.Any, 1234);
Socket server = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
When I type 10.0.0.2 in the client's windows I get all works fine.
When I type my WAN IP as shown in wahismyip.com I get this:
Code:
Unhandled Exception: System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it *IP*:1234
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at EchoClient.Program.Main(String[] args) in \EchoClient\Program.cs:line 20
what is the problem now?