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
. |