J
Joe Bain
Sorry if this is a repost, I don't think the first on sent.
I have made a program that runs on a .net PocketPC that talks over a
wireless network with a server running a program that is not written in
..net. The program works fine here, but gives an error message of "No
such host is known" at the customers location. I do not think they have
a DNS server at their place. In csharp how do you connect with TCP to a
server without causing a DNS lookup. Here is the code I am using now.
Not that ServerAddr is a string containing the valid IPAddress of the
server.
socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream,
ProtocolType.Tcp);
socket.Blocking = true;
IPHostEntry IPHost = Dns.GetHostByAddress(IPAddress.Parse(ServerAddr));
string[] aliases = IPHost.Aliases;
IPAddress[] addr = IPHost.AddressList;
IPEndPoint ipepServer = new IPEndPoint(addr[0], Port);
socket.Connect(ipepServer);
I can give you the output of IPConfig run from the server if it will
help. Also I can ping the server from the pocketPC so I know it can see
it.
I have made a program that runs on a .net PocketPC that talks over a
wireless network with a server running a program that is not written in
..net. The program works fine here, but gives an error message of "No
such host is known" at the customers location. I do not think they have
a DNS server at their place. In csharp how do you connect with TCP to a
server without causing a DNS lookup. Here is the code I am using now.
Not that ServerAddr is a string containing the valid IPAddress of the
server.
socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream,
ProtocolType.Tcp);
socket.Blocking = true;
IPHostEntry IPHost = Dns.GetHostByAddress(IPAddress.Parse(ServerAddr));
string[] aliases = IPHost.Aliases;
IPAddress[] addr = IPHost.AddressList;
IPEndPoint ipepServer = new IPEndPoint(addr[0], Port);
socket.Connect(ipepServer);
I can give you the output of IPConfig run from the server if it will
help. Also I can ping the server from the pocketPC so I know it can see
it.