From: Patrick Hurley Date: 2005-03-25T07:00:16+09:00 Subject: Re: Is there a way to bind a socket to a specific local interface in a client application? Try binding to 0.0.0.0, if I understand what you are trying to do that should take care of it. Patrick On Thu, 24 Mar 2005 23:51:26 +0900, Joshua M. Miller wrote: > I am creating an application that I would like to have bind to one of > several ethernet devices that I have on my machine. Does anyone know if > this can be done with Ruby? An example: > > A normal socket opening in Ruby: > > client1 = TCPSocket.new('192.168.1.5', port) > > ...here I have opened a TCP socket to 192.168.1.5 on a non-specified > port. Is there a way to specify the local device that corresponds to IP > address 192.168.1.6 or any other address associated with a local interface? > > TIA, > > Josh > >