Kent Dahl <kentda / stud.ntnu.no> wrote in message news:<3DBA3430.92240B21 / stud.ntnu.no>...
> Kevin Pauli wrote:
> > 
> > I am coming to Ruby from Java and I must say it is fantastic!
> > 
> > Something that should be basic is eluding me, however.  Despite
> > searching through the PP guide, online references, and usenet posts, I
> > cannot figure out how to create a Net::HTTP object bound to a specific
> > local IP address of my choosing.  It always seems to want to use
> > 'localhost'.  I am using Ruby 1.6.  I just discovered the RAA, are
> > there perhaps any libraries on there that could help?
> > 
> > Any pointers in the right direction would be much appreciated.
> 
> You do pass the local IP in to the new method?
>   http://www.rubycentral.com/book/lib_network.html#Net::HTTP.new

Thanks for the response.  That address argument seems to be the target
address.  I need to specify the IP address to use on the machine where
the Ruby interpreter is running.  (My machine is multi-homed, with
several IP addresses bound to it).  For example, I would expect
something like this java.net.Socket constructor provides:

public Socket(InetAddress address, int port, InetAddress localAddr,
int localPort)

Notice that you can specify the local address and port as well as the
target address and port.

Am I missing something in the Ruby version, or is the capability
simply not available?