On Fri, Feb 3, 2012 at 10:36 AM, Ivo Wever <wever / axini.com> wrote:
> If I send a UDP packet containing 'foo' like this:
>
>  ¨ÂïãëåÕÄÐÓïãëåô®îå>  ¨Âïãëåô®óåôóïãëïðô¨ÓïãëåôººÓÏÌßÓÏÃËÅÔ¬ ÓïãëåôººÓÏßÂÒÏÁÄÃÁÓÔôòõå>  ¨Âïãëåô®óåî䨧æïï§°¬ §¼âòïáäãáóô¾§¬ ´°°°±©
>
> 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?

Use #bind - http://ruby-doc.org/stdlib-1.9.3/libdoc/socket/rdoc/Socket.html#method-i-bind