PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Compact Framework Compact Framework TCP Client

Reply

Compact Framework TCP Client

 
Thread Tools Rate Thread
Old 27-05-2004, 10:17 AM   #1
prubbert
Guest
 
Posts: n/a
Default Compact Framework TCP Client


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

  Reply With Quote
Old 27-05-2004, 10:40 AM   #2
Jon Skeet [C# MVP]
Guest
 
Posts: n/a
Default Re: Compact Framework TCP Client

prubbert <msNews@rubbert.co.uk> wrote:
> 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.

--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off