From: Ivo Wever Date: 2012-02-03T19:36:46+09:00 Subject: Choosing target network for UDP broadcast If I send a UDP packet containing 'foo' like this: socket = UDPSocket.new socket.setsockopt(Socket::SOL_SOCKET, Socket::SO_BROADCAST, true) socket.send('foo', 0, '', 40001) then wireshark tells me it gets sent from 192.168.x.y. However, my server is listening on localhost:40001. How can I choose the source address from which (and the interface via which) the socket will send its packet? -- Posted via http://www.ruby-forum.com/.