Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > How to get IP address will be used by HTTP in C++

Reply
Thread Tools

How to get IP address will be used by HTTP in C++

 
 
jchliustuff@yahoo.com
Guest
Posts: n/a
 
      02-01-2008
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
 
Reply With Quote
 
 
 
 
Sam
Guest
Posts: n/a
 
      02-01-2008
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-----

 
Reply With Quote
 
 
 
 
jchliustuff@yahoo.com
Guest
Posts: n/a
 
      02-01-2008
Thanks for your tip.

Leo
 
Reply With Quote
 
Christopher
Guest
Posts: n/a
 
      02-02-2008
On Feb 1, 4:22 pm, jchliust...@yahoo.com wrote:
> 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


alt.winsock and alt.winsock programming are probably the more
frequented groups to consult for such things, although traffic isn't
what I'd like it to be.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
HTTP SOAP/HTTP GET/HTTP POST milan_9211 Software 0 01-10-2011 02:10 PM
Controling source IP address used on outbound HTTP GET request timwhunt@gmail.com Java 2 01-16-2007 10:21 PM
XML HTTP GET does not seem to work in IE6 when used with setTimeout Robert S Javascript 2 07-23-2006 12:32 PM
HTTP GET vs HTTP POST protocol serge calderara ASP .Net Web Services 1 11-04-2005 01:27 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57