Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Binding a specific IP address for Net::HTTP

Reply
Thread Tools

Binding a specific IP address for Net::HTTP

 
 
Stephan Pilot
Guest
Posts: n/a
 
      11-27-2006
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/.

 
Reply With Quote
 
 
 
 
Stephan Pilot
Guest
Posts: n/a
 
      11-27-2006
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/.

 
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
XML parsing problem finding a specific element in a specific place mazdotnet ASP .Net 2 10-02-2009 10:07 AM
Is ViwState Page-Specific or UserControl-Specific =?Utf-8?B?SmF2?= ASP .Net 2 08-16-2006 09:30 PM
redirect traffic on specific ip to specific interface mimiseh Cisco 3 06-05-2005 09:14 PM
binding ICMP to a specific IP address Stuart Kendrick Perl Misc 3 12-01-2003 12:44 AM
How do you make sure a frameset is loaded? I'm trying to open a frameset in a new window which shows a specific html page in a specific frame ck388 Javascript 1 09-24-2003 08:32 PM



Advertisments