c# System.Net.Sockets.Socket.Connect() help -
i trying develop, guessed it, multiplayer networking. first stage figure out if can connection server. whooptydoo, pot 80 works! :d
however, port 81, 90, 2700, 8092, , other ports try not work.
now, have feeling may because there nothing on other end accept connection. because step 2 in figuring out networking (for me, anyways), hesitant go there.
i've unblocked port want connect to. (i've allowed both incoming, , outgoing tcp connections).
this using start socket:
s = new socket(addressfamily.internetwork, sockettype.stream, protocoltype.tcp ); to connect:
s.connect(hostendpoint); to create hostenpoint:
hostendpoint = new ipendpoint(hostaddress, conport); i no error exceptions, or that. code seems freeze when gets connect().
i've tried blocking port 80, , running code connect 80, , same thing happens.
so, bit close wrong? else? need make program accept connections on port, , run on server?
thanks guys. :)
in case, may use old dos window (cmd.exe) , use
telnet host port
command , check error result. connection refuse shows there no listener, connection timeout indicates firewall. check individual windows firewall blocking.
Comments
Post a Comment