From: Sam Roberts Date: 2005-03-29T10:48:39+09:00 Subject: Re: Is there a way to bind a socket to a specific local interface in a client application? Quoting jmille24@leo.gov, on Thu, Mar 24, 2005 at 11:51:26PM +0900: > 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? Can't remember if I replied to this... use the Socket class. Cheers, Sam