1.0.6 • Published 8 years ago

gosock v1.0.6

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

GoSock client

Usage

var sock = new GoSock('ws://localhost', {
  reconnect: true,
  retries: 5,
  retryInterval: 1000,
});

sock.on('open', function(){
  console.log('open');
});

sock.on('error', function(err){
  console.log(err);
});

sock.on('close', function(){
  console.log('close');
});

sock.on('new.msg.response', function(data){
  console.log(data);
});

sock.send('new.msg', {data: 'hello world'});

sock.remove('new.msg');
1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago