jc*********@yahoo.com writes:
How to get IP address will be used by HTTP in C++
There's no such thing as "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?
That depends on your specific platform. Try a newsgroup that's appropriate
for your operating system, that's oriented towards development topics. This
has nothing to do with C++. You can also implement HTTP in Python and Perl,
for example, and the same question applies.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
iD8DBQBHo583x9p3GYHlUOIRAuuCAJ9AgiN5gkIopE8zLFE95M WDXKx5VwCfWfmI
KlGTkgxxWHrUQO0TmtfHdzc=
=Kw6h
-----END PGP SIGNATURE-----