1.0.2 • Published 9 years ago

udp-hole v1.0.2

Weekly downloads
4
License
MIT
Repository
-
Last release
9 years ago

UDP/IP hole punching

Just an example to create an p2p communication with node streams.

var Hole = require('udp-hole');

var hole = new Hole({
  name: "client2",
  host: "127.0.0.1", // server address
  port: 41234, // server port
  bind: 41236
});

hole.on('ready', function() {
  hole.punch("client1");
}).on("punch", function(socket) {
  process.stdin.pipe(socket).pipe(process.stdout);
});
1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago