Skip to main content

Class: SocketBroadcastHandler

Defined in: socket/broadcast.ts:14

A subclass of the SocketEventHandler that handles the broadcast events.

Extends

Constructors

Constructor

new SocketBroadcastHandler(
room,
eventName,
source,
payload,
memberSocket): SocketBroadcastHandler;

Defined in: socket/index.ts:59

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
memberSocketstringThe member socketID to send event to (may be null)

Returns

SocketBroadcastHandler

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
memberSocketprotectedstringMemberSocket IDSocketEventHandler.memberSocketsocket/index.ts:50
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

isSDPEvent()

protected isSDPEvent(): boolean;

Defined in: socket/index.ts:110

Checks the Event Name for sdp events

Returns

boolean

room:event or the SDP event Name

Inherited from

SocketEventHandler.isSDPEvent


parametersReturn()

protected parametersReturn(): IKeyValue;

Defined in: socket/index.ts:120

Returns the parameters for the broadcast event, with special consideration for SDP events

Returns

IKeyValue

broadcast parameters

Inherited from

SocketEventHandler.parametersReturn


passthru()

protected passthru(): Promise<void>;

Defined in: socket/index.ts:77

Event to Trigger a sendToRooms event.

Returns

Promise<void>

Inherited from

SocketEventHandler.passthru


process()

protected process(): Promise<any>;

Defined in: socket/broadcast.ts:19

Broadcasts are pushed through

Returns

Promise<any>

original data, plus "source"

Overrides

SocketEventHandler.process


result()

result(): Promise<SocketIOContextOutput>;

Defined in: socket/index.ts:101

The output produced from this.process

Returns

Promise<SocketIOContextOutput>

Inherited from

SocketEventHandler.result