PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Compact Framework Re: ip address of the desktop

Reply

Re: ip address of the desktop

 
Thread Tools Rate Thread
Old 08-07-2003, 07:32 AM   #1
Tibor Meinczinger
Guest
 
Posts: n/a
Default Re: ip address of the desktop


Hi,

I have tried the following code fragment on the device:
IPHostEntry host = Dns.GetHostByName("PPP_PEER");
IPAddress ip = host.AddressList[0];
IPEndPoint endPoint = new IPEndPoint(ip, _port);
_client = new TcpClient();
_client.Connect(endPoint);


Strange is, that it seems to get connected. It is strange,
because I have some logging mechanism on the server and
there is no message that a client has arrived. However,
calling Connect does not throw any exception. After trying
to send some data:
_stream = _client.GetStream();
_stream.Write(data.XmlData, 0, data.XmlData.Length);

I get an "Unable to write data to the transport
connection".

PPP_PEER hides the ip 192.168.55.100 (192.168.55.101 is
the ip of the device), but it seems to me that this ip's
belong to Activesync's "own" network, you cannot use them
in your own applications. I think that the port my server
is listening on the desktop does not really exist if I use
the PPP_PEER hostname. Is that correct or did I miss
something?

If I don't use the PPP_PEER hostname but the real ip of my
desktop (plus the right port, in my case 10200), than
everything works well.
Thanks,
zeppi

>-----Original Message-----
>If the device is connected via ActiveSync, you can use

hostname PPP_PEER to
>address the desktop computer
>
>"Tibor Meinczinger" <meinczinger@web.de> wrote in message
>news:08d701c3447e$77e7e4c0$a301280a@phx.gbl...
>> Hi,
>>
>> i have a server on the desktop which listens to a

certain
>> port. Can an application on the device somehow find out
>> the ip address of the desktop or do I need some config
>> file on the device which stores the ip?
>> thanks

>
>
>.
>

  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