simudp

dgram module for the browser thru a proxy based on socket.io

Simudp : udp for the browser.

Imitates exactly the dgram API in the browser and backed by socket.io/UDP proxy.

$ npm install simudp
var server = require('http').createServer();
 
require('simudp').listen(server);
 
server.listen(8080);
<!-- you need to serve SimUDP.js by your own -->
<script src="/SimUDP.js"></script>
<script>
  
var socket = SimUDP.createSocket('udp4');
 
var hello = new SimUDP.Buffer('hello');
 
socket.send(hello, 0, hello.length, 3000, 'anywhere.com');
 
socket.on('message', function(bufrinfo) {
  //... 
});
 
//you've understood, it's dgram for the browser...
</script> 

Read the source or ask around.

Simudp is fully compatible with browserfy. Best way is to use directly dgram-browserify.