cb-hyperion

1.11.1 • Public • Published

hyperion

Custom web protocol implementation with Publish & Subscribe and Point to Point RPC,

here is an example of server:

 
var hyperion = require('cb-hyperion').Server;
 
var server = new hyperion(8080);
var allBroadcast = server.registerBroadcast('all');
 
server.registerMethod('join', function(ws){
    allBroadcast.addTarget(ws);
    console.log('joined all');
});
 
server.registerMethod('send', function(ws, msg){
    allBroadcast.send(msg);
    console.log('sending to all:'+msg);
});
 

Package Sidebar

Install

npm i cb-hyperion

Weekly Downloads

3

Version

1.11.1

License

Unlicense

Last publish

Collaborators

  • odrinwhite