floca-socket-client
v1.1.0
Published
Websocket client for floca-based projects
Downloads
4
Readme
floca-socket-client
Client for webapps to connect to services in a floca-based projects published via Websocket.
Usage
Require your connector:
var Connector = require('floca-socket-client');
Connect to the running floca server from your webapp:
var options = {};
Connector.connect( 'WebSocketURI', options, function(err,res){
} );
Pass the socket path used in your floca-based project.
When it is connected, emit a message to a service of a given entity:
Connector.emit( division, event, params, opts, function(err, response){
} );
Addressing follows the logic of harcon used by floca heavily.
And you are ready to go!
Please check the other client connectors : for AMQP and for REST