xsockets
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/xsockets package

0.2.0 • Public • Published

xsockets

a socket optimized for cross-domain use for the web and node. it's easy to use:

var sockets = require('xsockets');
 
sockets.listen(9999, function(socket) {
    socket.on('message', function(message) {
        socket.send(message); // echo
    });
});
 
var socket = sockets.connect('localhost:9999');
 
socket.send({hello:'world'});
socket.on('message', function(message) {
    console.log(message);
});
 

/xsockets/

    Package Sidebar

    Install

    npm i xsockets

    Weekly Downloads

    2

    Version

    0.2.0

    License

    none

    Last publish

    Collaborators

    • mafintosh