1.7.1 • Published 7 years ago

sg-socket-constants v1.7.1

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
7 years ago

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
KeyValue
OKsg:acknowledge:ok
NGsg:acknowledge:ng
AuthEvents
KeyValue
AUTHENTICATIONauthentication
AUTHENTICATEDauthenticated
UNAUTHORIZEDunauthorized
GreetingEvents
KeyValue
HIsg:greet:hi
BYEsg:greet:bye
LockingEvents
KeyValue
ALLOCsg:lock:alloc
RELEASEsg:lock:release
LOCKsg:lock:lock
UNLOCKsg:lock:unlock
ObservingEvents
KeyValue
STARTsg:remote:start
STOPsg:remote:stop
CHANGEsg:remote:change
PubsubEvents
KeyValue
RAISEsg:pubsub:raise
SHUTsg:pubsub:shut
PUBLISHsg:pubsub:publish
COUNTsg:pubsub:count
SUBSCRIBEsg:pubsub:subscribe
UNSUBSCRIBEsg:pubsub:unsubscribe
RECEIVEsg:pubsub:receive
RemoteEvents
KeyValue
SPECsg:remote:spec
DESPECsg:remote:despec
PURGEsg:remote:purge
JOINsg:remote:join
LEAVEsg:remote:leave
PERFORMsg:remote:perform
RESULTsg:remote:result
PIPEsg:remote:pipe
ERRORsg:remote:error
NOTICEsg:remote:notice
ReservedEvents
KeyValue
CONNECTIONconnection
CONNECTconnect
RECONNECTreconnect
CONNECT_ERRORconnect_error
CONNECT_TIMEOUTconnect_timeout
DISCONNECTdisconnect
ERRORerror

License

This software is released under the Apache-2.0 License.

Links