.... 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

On Friday, 9 March 2012 01:19:19 UTC, Dave Clements wrote:
>
> Hey guys, 
>
> I keep getting an EBADF error with this code:
>
>     var socket = dgram.createSocket('udp4')
>
>     socket.setTTL(128);
>           
>     socket.send(dummyBuffer, 0, 60, port, domain, function (err, bytes) {
>       if (err) {throw err;}
>
>     });
>
>
> Can anyone tell me what I'm doing wrong? Is this a bug?
>
> Best, 
>
> Dave
>
>
>

-- 
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to