Constants variables for socket
$ npm install sg-socket-constants --save
'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'
})
Key | Value |
---|---|
OK | sg:acknowledge:ok |
NG | sg:acknowledge:ng |
Key | Value |
---|---|
AUTHENTICATION | authentication |
AUTHENTICATED | authenticated |
UNAUTHORIZED | unauthorized |
Key | Value |
---|---|
HI | sg:greet:hi |
BYE | sg:greet:bye |
Key | Value |
---|---|
ALLOC | sg:lock:alloc |
RELEASE | sg:lock:release |
LOCK | sg:lock:lock |
UNLOCK | sg:lock:unlock |
Key | Value |
---|---|
START | sg:remote:start |
STOP | sg:remote:stop |
CHANGE | sg:remote:change |
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 |
Key | Value |
---|---|
SPEC | sg:remote:spec |
DESPEC | sg:remote:despec |
JOIN | sg:remote:join |
LEAVE | sg:remote:leave |
PERFORM | sg:remote:perform |
PIPE | sg:remote:pipe |
Key | Value |
---|---|
CONNECTION | connection |
CONNECT | connect |
RECONNECT | reconnect |
CONNECT_ERROR | connect_error |
CONNECT_TIMEOUT | connect_timeout |
DISCONNECT | disconnect |
ERROR | error |
This software is released under the Apache-2.0 License.