Open mvayngrib opened 9 years ago
True. Will take a look into it.
Kind of off-topic, but have you used promises? If so, what are your thoughts?
I'm asking because I'm considering having the library return promises for a lot of the async calls. Not for all library calls, but definitely client.send
.
I use promises a lot actually...maybe too much. They're good, but I'm not sure I love them as much as I used to.
what would be cool, is being able to pipe to and from an rudp client:
var client = new rudp.Client(socket, address, port)
process.stdin.pipe(client)
client.pipe(process.stdout)
// and of course duplex mode
socket.pipe(client).pipe(socket)
then you could basically use it as a tcp socket
while we're on the subject of cool things, one more would be a pollyfill of node's "net" module over rudp. Then you can plug it right into something like webtorrent and use udp for everything
Good idea.
would be nice to be able to do something like this:
client.send(data, function() { // the packets this data was split up into have all been acknowledged })