I have a working UDP implementation for node up on github:
<http://github.com/pquerna/node/tree/udp>
Just the patch:
<http://hera.kimaker.com/~chip/patches/node_dgram_v1.patch>
'Features':
- Adds new dgram module, for all data-gram type transports
- Supports both UDP client and servers
- Supports Unix Daemon sockets in DGRAM mode too (think syslog)
- Uses a shared Buffer and slices that as needed to be reasonably performant.
- One supplied test program so far, test-dgram-pingpong
- Passes test cases on osx 10.6 and ubuntu 9.10
Examples:
<http://gist.github.com/435513>
<http://github.com/pquerna/node/blob/udp/test/simple/test-dgram-pingpong.js>
Thanks to Ryan for giving feedback on a first version earlier today.
Thoughts?
Thanks,
Paul
Thanks Paul, this is great! Landed in 02da5ed.
What will you do for the weekend though?
Nice! That was fast.
What will you do for the weekend though?
--
You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.
No. I've been meaning to add 'pack' and 'unpack' functionality to
buffers for a while now. You can find a few examples in node-amqp:
http://github.com/ry/node-amqp/blob/5abe293f2206347153abc7206f55a3ef5b1338fb/amqp.js#L238