@penggy/wsc
v1.0.10
Published
websocket client auto reconnect
Downloads
5
Readme
@penggy/wsc
Websocket client implementation for auto reconnect. copy from here
Install
npm i @penggy/wsc
Write a simple client:
var wsc = new WebSocketClient();
wsc.open('wss://localhost:443/');
wsc.onopen = function(e){
console.log("WebSocketClient connected:",e);
this.send("Hello World !");
}
wsc.onmessage = function(data,flags,number){
console.log(`WebSocketClient message #${number}: `,data);
}