shovon / node-rudp

Reliable UDP for Node.js
33 stars 14 forks source link

emit event on receipt of all packets in a "message" #10

Open mvayngrib opened 8 years ago

mvayngrib commented 8 years ago

When A sends a msg M to B, B should be able to know when it's received the entire message M (as opposed to 'data', which is a fragment of M).

From a usage perspective, maybe something like:

a.send(aLongMessage)
b.on('message', function (msg) {
//  msg === aLongMessage
})