Class

WebSocketClient

WebSocketClient(ws, connectionId, userId, investigationId, logger)

Simple WebSocket client with event emitter

Constructor

# new WebSocketClient(ws, connectionId, userId, investigationId, logger)

Create a WebSocket client

Parameters:
Name Type Description
ws WebSocket

WebSocket instance

connectionId string

Connection ID

userId string

User ID

investigationId string | null

Investigation ID

logger Logger

Logger instance

View Source socket/websocket-client.js, line 5

Classes

WebSocketClient

Methods

# send(event, data)

Send an event to the client

Parameters:
Name Type Description
event string

Event name

data unknown

Event data

View Source socket/websocket-client.js, line 68