Skip to content

Latest commit

 

History

History
115 lines (64 loc) · 3.37 KB

class.WebSocketService.md

File metadata and controls

115 lines (64 loc) · 3.37 KB

directus-monorepo ( Readme | API )


directus-monorepo > WebSocketService

Class: WebSocketService

Constructors

constructor()

new WebSocketService(): WebSocketService

Returns

WebSocketService

Source

api/src/services/websocket.ts:14

Properties

controller

private controller: WebSocketController

Source

api/src/services/websocket.ts:12

Methods

broadcast()

broadcast(message, filter?): void

Parameters

Parameter Type
message string | objectOutputType< {type: ZodString; uid: ZodOptional< ZodUnion< [ZodString, ZodNumber] > >;}, ZodTypeAny, "passthrough" >
filter? object
filter.role? string
filter.user? string

Returns

void

Source

api/src/services/websocket.ts:36


clients()

clients(): Set< WebSocketClient >

Returns

Set< WebSocketClient >

Source

api/src/services/websocket.ts:44


off()

off(event, callback): void

Parameters

Parameter Type
event "connect" | "message" | "error" | "close"
callback ActionHandler

Returns

void

Source

api/src/services/websocket.ts:32


on()

on(event, callback): void

Parameters

Parameter Type
event "connect" | "message" | "error" | "close"
callback ActionHandler

Returns

void

Source

api/src/services/websocket.ts:28


Generated using TypeDoc and typedoc-plugin-markdown