1.0.0-alpha4 • Published 9 years ago

rudp v1.0.0-alpha4

Weekly downloads
6
License
MIT
Repository
github
Last release
9 years ago

rudp

Reliable UDP implementation for Node.js.

Example

For a peer-to-peer application, you can write a script like this:

var rudp = require('rudp');
var dgram = require('dgram');

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

socket.bind(localPort);

var client = new rudp.Client(socket, remoteAddress, remotePort);

// And do whatever you want here

No really; that above code will actually work, even if all hosts were sitting behind a NAT. Give it a try. For the heck of it, give rudp a try with a file sharing example.