Peer-to-Peer Socket Problems

  • Thread starter Thread starter Mariza
  • Start date Start date
M

Mariza

Hi,

I have written an application for Windows CE and Pocket PC devices that
communicates with an application on a server through a socket
connection.

Up til now I have worked with the server application installed on my
machine. The handheld was set up to connect to our LAN, and then make
a socket connection to machine using my machine's IP address.

I have now set up the device with a laptop in a peer-to-peer network.
The server application is installed on the laptop and is listening on
the socket. Yet I cannot seem to connect to the laptop. When I use
DNS.Resolve with the IP address or computer name it gives me a "No such
host known" SocketException. When I just use the IPAddress.Parse
method, my connection attempt just times out and gives me a message
that the remote host did not respond in the adequate amount of time.

I would like to know what causes this and, if possible, how I can fix
this?

Regards,
Mariza
 
There would be *no* reason to call DNS.Resolve with an *IP address*.
DNS.Resolove is for taking a *name* and converting that into an IP address.
If you already know the IP address, just use it directly.

Can you ping the client devices from the laptop? If not, you have a network
connectivity problem, *not* a .NET Compact Framework problem and the most
likely problem is with your understanding of how networks work. Talk to the
network guy at your location...

Paul T.
 
Back
Top