J
jchliustuff
How to get IP address will be used by HTTP in C++
At the client side, when my client machine talks to server, the server
will see the IP address of my machine as part of HTTP request. My
question is how I can programmatically get this IP address which will
be used in HTTP request? I could use gethostname to get IP addresses,
but that is a list. How can I tell which one will be used?
Thanks very much in advance.
Leo
At the client side, when my client machine talks to server, the server
will see the IP address of my machine as part of HTTP request. My
question is how I can programmatically get this IP address which will
be used in HTTP request? I could use gethostname to get IP addresses,
but that is a list. How can I tell which one will be used?
Thanks very much in advance.
Leo