Compact Framework TCP Client

P

prubbert

Hi,

I've written a TCP Client and Server app that runs from a CE.Net device (Client) to my laptop (server). This runs without any problems if I use my wireless access point to provide the network.

However, If I make a "computer to computer" connection using a wireless card in my laptop and the device, the client can't find the server's IP. I can still ping the laptop from the device.

This is a cut down version of the client code (just to try and get a connection)

Dim tcpclnt As New TcpClient
tcpclnt.Connect("10.1.1.1", "8000")

Thanx

Paul
 
J

Jon Skeet [C# MVP]

prubbert said:
I've written a TCP Client and Server app that runs from a CE.Net
device (Client) to my laptop (server). This runs without any problems
if I use my wireless access point to provide the network.

However, If I make a "computer to computer" connection using a
wireless card in my laptop and the device, the client can't find the
server's IP. I can still ping the laptop from the device.

This is a cut down version of the client code (just to try and get a
connection)

Dim tcpclnt As New TcpClient
tcpclnt.Connect("10.1.1.1", "8000")

I've had a similar problem - I believe it's due to using a number
rather than a name. I use IPAddress.Parse(host); to try to parse the
hostname, and if that succeeds, I use the returned IPAddress -
otherwise I connect with the hostname as normal.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top