N
nano2k
Hi
I have a client application that consumes a webservice, both developed
by me.
For each connected client I need to keep several information.
One piece of info is to uniquely identify each client along with the
location where the connection was initiated by the client application.
That is, let's say my computer is inside a LAN with a local IP. Let's
say 192.168.0.10. My machine communicates over the Internet through a
router which, of course, has a phisical IP.
The webservice is published at: http://www.ikonsoft.ro
To uniquely identify a client, the webservice needs to know 2 pieces
of info:
1. Router's IP - public; can be easily obtained
2. Local IP of the connecting machine.
This second IP must be communicated to the webservice at connection
time.
But first, the local machine has to know the IP used to communicate
with the webservice. Is there a way for the client application to
obtain this value? I mean, there could be several interfaces installed
on a system, but only one will be used to communicate with the
webservice. How to determine this particular interface along with its
IP? It's easy to enumerate the list of configured IPs on local
machine, but determining the right one, beats me
Thanks.
I have a client application that consumes a webservice, both developed
by me.
For each connected client I need to keep several information.
One piece of info is to uniquely identify each client along with the
location where the connection was initiated by the client application.
That is, let's say my computer is inside a LAN with a local IP. Let's
say 192.168.0.10. My machine communicates over the Internet through a
router which, of course, has a phisical IP.
The webservice is published at: http://www.ikonsoft.ro
To uniquely identify a client, the webservice needs to know 2 pieces
of info:
1. Router's IP - public; can be easily obtained
2. Local IP of the connecting machine.
This second IP must be communicated to the webservice at connection
time.
But first, the local machine has to know the IP used to communicate
with the webservice. Is there a way for the client application to
obtain this value? I mean, there could be several interfaces installed
on a system, but only one will be used to communicate with the
webservice. How to determine this particular interface along with its
IP? It's easy to enumerate the list of configured IPs on local
machine, but determining the right one, beats me
Thanks.