This is a client for rockets/rockets.
npm install rockets
var Rockets = ;var client = ;// Register events on the client.client;client;// Initiate the client's socket connection.client;
Events can be registered with
|connect||Connection to the server has been established|
|disconnect||Connection to the server has been lost|
|error||error||Error has occurred|
|model||model||Received model, either post or comment|
|comment||model||Received a comment|
|post||model||Received a post|
|subscribe||channel, [include [, exclude]]||Subscribes to a channel, with optional include and exclude rules|
|close||Close the connection to the server|
Illustrations by Ken Samonte.