"Can´t open socket or connection refused" with .NET

Posted by HoNgOuRu on Stack Overflow See other posts from Stack Overflow or by HoNgOuRu
Published on 2010-03-09T18:51:52Z Indexed on 2010/03/13 3:27 UTC
Read the original article Hit count: 249

Filed under:
|
|
|

Im getting a connection refused when I try to send some data to my server app using netcat.

server side:

IPAddress ip;
ip = Dns.GetHostEntry("localhost").AddressList[0];
IPEndPoint ipFinal = new IPEndPoint(ip, 12345);
Socket socket = new Socket(AddressFamily.InterNetworkV6, SocketType.Stream, ProtocolType.Tcp);
socket.Bind(ipFinal);
socket.Listen(100);
Socket handler = socket.Accept(); ------> it stops here......nothing happens

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET