Re: TcpClient Problem
- From: "Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT com>
- Date: Mon, 15 Oct 2007 08:09:39 -0700
When you pass a string, that's interpreted as a host name, *NOT* an IP
address.
Paul T.
"Andy Baker" <abaker@xxxxxxxxxxxxxxxxxx> wrote in message
news:13h6vil22tnev53@xxxxxxxxxxxxxxxxxxxxx
I have got it working. I have changed the code to create the TcpClient
first, then connect using an IPAddress rather than a string i.e.
Dim ParsedIPAddress as IPAddress
ParsedIPAddress = IPAddress.Parse("192.168.1.10")
client = New TcpClient
client.Connect(ParsedIPAddress, PORT_NUM)
and it works as it did before on the previous WiFi card/CE combination. I
don't know why it should work with one and not the other, but at least it
gets me out of trouble. Thanks for your help.
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:O03dFFeAIHA.1204@xxxxxxxxxxxxxxxxxxxxxxx
No. Connectivity is all you need. Maybe you specified the wrong port
number or something. As Simon said, try plain sockets, if that doesn't
seem to be the problem...
Paul T.
"Andy Baker" <abaker@xxxxxxxxxxxxxxxxxx> wrote in message
news:13fpe5sjrsuab40@xxxxxxxxxxxxxxxxxxxxx
It seems to be more complicated than that. I should have said that I can
ping the host PC from the device successfully using the same IP address
as I am using in the TcpClient I have checked the wireless configuration
settings and they seem to be identical. Under the 'Wireless Information'
tab it reports it as being connected and IP information / subnet mask is
correct. Are there any more settings that I am not aware of?
Andy Baker
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam
DOT com> wrote in message news:eT89yKSAIHA.968@xxxxxxxxxxxxxxxxxxxxxxx
It sounds like there is no network path from you, on the device, to the
PC. That's probably not a feature of what sort of an adapter is used,
but whether it's actually connected to the right access point/wireless
network. You should compare the wireless configurations on the two
devices...
Paul T.
"Andy Baker" <abaker@xxxxxxxxxxxxxxxxxx> wrote in message
news:13fn9a8lt4cr925@xxxxxxxxxxxxxxxxxxxxx
I have a VB.NET 2003 application that has been running successfully on
a device running CE.NET 4.2. I have recently been supplied with the
latest version of the device, which runs CE.NET 5, and also has a
different WiFi adapter to my original version. The application connects
to a desktop PC using a TcpClient as follows:-
Private client as TcpClient
client = New TcpClient(IPAddress, PORT_NUM)
where IPAddress is 192.169.1.10 (the address of the host PC) and
PORT_NUM is a constant - the number of the port I want to use for the
connection (10000 in this case). The application on the host PC has a
listener object waiting for a connection on the same port number. On
the CE 4.2 device it works fine, on the new one I get the error
message 'No such host is known' after a few seconds (on the New
TcpClient line above). Is this likely to be a CE problem or a WiFi
adapter problem (or something else), and what can I do about it?
Thanks in advance.
Andy Baker
.
- Follow-Ups:
- Re: TcpClient Problem
- From: Andy Baker
- Re: TcpClient Problem
- References:
- Re: TcpClient Problem
- From: Andy Baker
- Re: TcpClient Problem
- Prev by Date: Re: Static Ip;
- Next by Date: Re: Hook mouse events
- Previous by thread: Re: TcpClient Problem
- Next by thread: Re: TcpClient Problem
- Index(es):
Relevant Pages
|