0.0.7 • Published 8 years ago

node-ncid-client v0.0.7

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

node-ncid-client

you can make ncid client useing node.js

Getting Started

Install :

  • Install with npm: npm install node-ncid-client

Sample Code - es6:

import NcidClient from "node-ncid-client"

var client = new NcidClient( "localhost", 
							 "3333", 
							 { 
							 	auto_reconnect: true, 
							 	reconnect_interval: 1000 
							 })

client
	.on( NcidClient.EVENT.ONCONNECT, () => { console.log("onconnect"); } )
	.on( NcidClient.EVENT.ONMESSAGE, (data) => { 

		console.log("-------------------------\n")
		console.log("Recv Message\nHeader : " + data.header )

		for( var key in data.info ){
			console.log( key, " : ", data.info[key] )
		}

		console.log("-------------------------\n" )

	} )
		.start()

Sample Code - es5:

.
.
.
var NcidClient = require( "node-ncid-client" ).NcidClient
.
.
.
[ Same as es6 ]

Options :

When create new NcidClient instance, you can set some options.

auto_reconnect : Bool

reconnect_interval : Int ( Millisecond )

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago