HighTechTalks DotNet Forums  

Re: ip address of the desktop

Dotnet Framework (Compact Framework) microsoft.public.dotnet.framework.compactframework


Discuss Re: ip address of the desktop in the Dotnet Framework (Compact Framework) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Tibor Meinczinger
 
Posts: n/a

Default Re: ip address of the desktop - 07-08-2003 , 03:32 AM






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

Quote:
-----Original Message-----
If the device is connected via ActiveSync, you can use
hostname PPP_PEER to
address the desktop computer

"Tibor Meinczinger" <meinczinger (AT) web (DOT) de> wrote in message
news:08d701c3447e$77e7e4c0$a301280a (AT) phx (DOT) 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 Search this Thread
Search this Thread:

Advanced Search
Display Modes

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



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.