npm.io
1.1.0 • Published 8 years ago

floca-socket-client

Licence
MIT
Version
1.1.0
Deps
1
Vulns
0
Weekly
0

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

Keywords