Binding a specific IP address for Net::HTTP

Discussion in 'Ruby' started by Stephan Pilot, Nov 27, 2006.

  1. I hope I'm not asking a question that has been answered
    many times before: I can't find any information on
    how to bind a specific IP address (on a server with
    multiple addresses) so that a post from a Net::HTTP
    object is sent with that specific IP address.

    Many thanks for your help!

    --
    Posted via http://www.ruby-forum.com/.
     
    Stephan Pilot, Nov 27, 2006
    #1
    1. Advertising

  2. Paul Lutus wrote:
    > Stephan Pilot wrote:
    >
    >> I hope I'm not asking a question that has been answered
    >> many times before: I can't find any information on
    >> how to bind a specific IP address (on a server with
    >> multiple addresses) so that a post from a Net::HTTP
    >> object is sent with that specific IP address.

    >
    > AFAIK the only way to do this (absent the use of platform-specific,
    > non-Ruby
    > properties) is to open the server using the desired address. It is not
    > possible to pick and choose addresses at runtime from the server side
    > during a server-client transaction.
    >
    > Or did you mean "port" when you said "address"?


    I was referring to an option available with the wget utility on Linux
    boxes ( e.g. --bind-address=10.0.0.1 ), since the http server I am
    trying to contact only allows connections from a specific IP address and
    I don't know how the ruby Net::HTTP selects its own IP address when
    there
    are several to choose from on the machine running ruby. I guess I will
    have
    to write a very basic http client using "handcrafted" sockets then?

    --
    Posted via http://www.ruby-forum.com/.
     
    Stephan Pilot, Nov 27, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?SmF2?=

    Is ViwState Page-Specific or UserControl-Specific

    =?Utf-8?B?SmF2?=, Aug 16, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    575
    =?Utf-8?B?SmF2?=
    Aug 16, 2006
  2. mazdotnet
    Replies:
    2
    Views:
    425
    Alexey Smirnov
    Oct 2, 2009
  3. Jim Cain
    Replies:
    0
    Views:
    122
    Jim Cain
    Mar 10, 2006
  4. Stuart Kendrick

    binding ICMP to a specific IP address

    Stuart Kendrick, Nov 30, 2003, in forum: Perl Misc
    Replies:
    3
    Views:
    520
    lostriver
    Dec 1, 2003
  5. William FERRERES
    Replies:
    7
    Views:
    240
    William FERRERES
    Jul 9, 2007
Loading...

Share This Page