teonet-client
v0.0.13
Published
Teonet client nodejs module
Downloads
3
Readme
Teonet client node.js module
Teonet client node.js module used in generator-teonet-client, generator-teonet-client-webkit to connect node.js client applications with Teonet.
Installation
npm install teonet-client
Developer notes
Use before build this package:
sudo apt-get install build-essential
To run projects examples in developer folder use:
npm link teonet-client
Usage
Export module teonetClient = require('teonet-client');
initialize teonetClient.init();
Establish a connection var connector = teonetClient.connectAsync( host_id, // host ip port, // port function(object, error_code) {// select-like method .................... }, function(error_code) { // Connection lost .................... } )
where: error_code is a code of last operartion ( 0 - success otherwise errno ) object: obj.event - event id obj.peer_name - peer name obj.cmd - cmd ??? obj.buffer - binary buffer