I'm getting a connection error when I used the following code to connect to a
server on our LAN with IP address. Can someone take a look and tell me if
you see something wrong? I'm just getting back error message that it's time
out and no connection was made.
Thanks, Alpha
string ServerIP = "192.168.7.1"
m_socClient = new Socket(AddressFamily.InterNetwork, SocketType.Stream,
ProtocolType.Tcp);
String ServerIP = server;
String szPort = "22333";
int alPort = System.Convert.ToInt16 (szPort,10);
System.Net.IPAddress remoteIPAddress = System.Net.IPAddress.Parse(ServerIP);
System.Net.IPEndPoint remoteEndPoint = new
System.Net.IPEndPoint(remoteIPAddress, alPort);
m_socClient.Connect(remoteEndPoint);