On Fri, Mar 9, 2012 at 02:25, Dave Clements <huperekch...@googlemail.com> wrote:
> .... How can I have worked on this for like.. 8 hours and just after posting
> suddenly work it out?
>
> Seems like you can't set the TTL the first send, so
>     var socket = dgram.createSocket('udp4')
>
> function doit() {
>     socket.send(dummyBuffer, 0, 60, port, domain, function (err, bytes) {
>       if (err) {throw err;}
>       socket.setTTL(128);
>       doit();
>
>     });
> }
>
> which makes the first TTL 64 and all thereafter 128

This works too:

  var socket = dgram.createSocket('udp4');
  socket.bind();

It's a change from how v0.4 works and it's something we (or at least
I) intend to fix sometime in the future. But for now, doing an
explicit bind() lets you work around it.

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to