Skip to main content

Class: SocketDataHandler

Defined in: socket/data.ts:14

A subclass of SocketEventHandler that handles sending socket data to rooms.

Extends

Constructors

Constructor

new SocketDataHandler(
room,
eventName,
source,
payload): SocketDataHandler;

Defined in: socket/index.ts:55

Parameters

ParameterTypeDescription
roomRoomThe Room where the event is happening
eventNamestringThe name of the event
sourceUserThe User associated with the event
payloadIKeyValueThe input values of the event

Returns

SocketDataHandler

Inherited from

SocketEventHandler.constructor

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
eventNameprotectedstringThe event name of a socket eventSocketEventHandler.eventNamesocket/index.ts:35
inputprotectedIKeyValueThe input of the socket eventSocketEventHandler.inputsocket/index.ts:41
outputprotectedSocketIOContextOutputThe output of the socket eventSocketEventHandler.outputsocket/index.ts:38
roomprotectedRoomThe room where the event is occurringSocketEventHandler.roomsocket/index.ts:44
sourceprotectedUserThe user associated with the eventSocketEventHandler.sourcesocket/index.ts:47

Methods

passthru()

protected passthru(): Promise<void>;

Defined in: socket/index.ts:66

Event to Trigger a sendToRooms event.

Returns

Promise<void>

Inherited from

SocketEventHandler.passthru


process()

protected process(): Promise<void>;

Defined in: socket/index.ts:81

A method to process data/information. Should be overridden in subclasses.

Returns

Promise<void>

Inherited from

SocketEventHandler.process


result()

result(): Promise<SocketIOContextOutput>;

Defined in: socket/data.ts:19

Sends data to the user, such as information from a tool.

Returns

Promise<SocketIOContextOutput>

Sends data to a room

Overrides

SocketEventHandler.result