sg-socket-constants
Constants variables for socket
Last updated 4 months ago by realglobe .
Apache-2.0 · Repository · Bugs · Original npm · Tarball
$ cnpm install sg-socket-constants 
SYNC missed versions from official npm registry.

sg-socket-constants

Build Status npm Version JS Standard

Constants variables for socket

Installation

$ npm install sg-socket-constants --save

Usage

'use strict'

const {
  LockingEvents
} = require('sg-socket-constants')

const sgSocketClient = require('sg-socket-client')

let socket = sgSocketClient('http://localhost:8004')
socket.emit(LockingEvents.LOCK, {
  name: 'resource01',
  by: 'me'
})

Values

AcknowledgeStatus
Key Value
OK sg:acknowledge:ok
NG sg:acknowledge:ng
AuthEvents
Key Value
AUTHENTICATION authentication
AUTHENTICATED authenticated
UNAUTHORIZED unauthorized
GreetingEvents
Key Value
HI sg:greet:hi
BYE sg:greet:bye
LockingEvents
Key Value
ALLOC sg:lock:alloc
RELEASE sg:lock:release
LOCK sg:lock:lock
UNLOCK sg:lock:unlock
ObservingEvents
Key Value
START sg:remote:start
STOP sg:remote:stop
CHANGE sg:remote:change
PubsubEvents
Key Value
RAISE sg:pubsub:raise
SHUT sg:pubsub:shut
PUBLISH sg:pubsub:publish
COUNT sg:pubsub:count
SUBSCRIBE sg:pubsub:subscribe
UNSUBSCRIBE sg:pubsub:unsubscribe
RECEIVE sg:pubsub:receive
RemoteEvents
Key Value
SPEC sg:remote:spec
DESPEC sg:remote:despec
PURGE sg:remote:purge
JOIN sg:remote:join
LEAVE sg:remote:leave
PERFORM sg:remote:perform
RESULT sg:remote:result
PIPE sg:remote:pipe
ERROR sg:remote:error
NOTICE sg:remote:notice
ReservedEvents
Key Value
CONNECTION connection
CONNECT connect
RECONNECT reconnect
CONNECT_ERROR connect_error
CONNECT_TIMEOUT connect_timeout
DISCONNECT disconnect
ERROR error

License

This software is released under the Apache-2.0 License.

Links

Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
  • co ^4.6.0
Dev Dependencies (13)

Copyright 2014 - 2016 © taobao.org |