Wondering what’s next for npm?Check out our public roadmap! »

rudp

1.0.0-alpha4 • Public • Published

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.

Keywords

none

Install

npm i rudp

DownloadsWeekly Downloads

3

Version

1.0.0-alpha4

License

MIT

Last publish

Collaborators

  • avatar