Skip to main content

Class: SocketIOWebSocketAdapter

A Socket.IO adapter for integrating Socket.IO with the HTTP Plugin.

Implements​

Constructors​

Constructor​

new SocketIOWebSocketAdapter(options): SocketIOWebSocketAdapter

Parameters​

options​

SocketIOWebSocketPluginOptions

Returns​

SocketIOWebSocketAdapter

Methods​

getRegisteredEvents()​

getRegisteredEvents(): readonly WebSocketEventDefinition[]

Retrieves the registered events from the adapter.

Returns​

readonly WebSocketEventDefinition[]

An array of event definitions that have been registered with the adapter.

Implementation of​

WebSocketAdapter.getRegisteredEvents


initialize()?​

optional initialize(server?): void | Promise<void>

Initializes the WebSocket adapter.

Parameters​

server?​

HttpServer

The HTTP server to use for the WebSocket connection. If not provided, the adapter will create its own.

Returns​

void | Promise<void>

A promise that resolves when the adapter has been initialized, or void if the operation is synchronous.

Implementation of​

WebSocketAdapter.initialize


registerEvents()​

registerEvents(events): void

Registers the provided events with the adapter.

Parameters​

events​

readonly WebSocketEventDefinition[]

An array of event definitions to be registered.

Returns​

void

A promise that resolves when the events have been registered, or void if the operation is synchronous.

Implementation of​

WebSocketAdapter.registerEvents


start()​

start(): Promise<void>

Starts the WebSocket adapter.

Returns​

Promise<void>

A promise that resolves when the adapter has been started, or void if the operation is synchronous.

Implementation of​

WebSocketAdapter.start


stop()​

stop(): Promise<void>

Stops the WebSocket adapter.

Returns​

Promise<void>

A promise that resolves when the adapter has been stopped, or void if the operation is synchronous.

Implementation of​

WebSocketAdapter.stop