Class CloverWebSocketInterface
Properties
Private endpoint
endpoint: string
Private logger
logger
: Logger = Logger.create()
Private webSocket
webSocket: any
Methods
createWebSocket
- createWebSocket(endpoint: string): any
getBufferedAmount
- getBufferedAmount(): number
Private notifyOnClose
- notifyOnClose(event: CloseEvent): void
Private notifyOnError
- notifyOnError(event: Event): void
Private notifyOnMessage
- notifyOnMessage(event: MessageEvent): void
Private notifyOnOpen
- notifyOnOpen(event: Event): void
removeListener
-
Parameters
Returns boolean
sendClose
-
Parameters
-
Optional code: number
-
Optional reason: string
Used to abstract implementation details to allow for NodeJS and Browser usage of the library.
WebSocket Clover Interface. Abstracts the WebSocket implementation so that the library is not tied to a Browser implementation.
Interface to connect a websocket implementation to.
https://developer.mozilla.org/en-US/docs/Web/API/WebSocket