Skip to main content

Interface: WebSocketPluginOptions

Represents the options for a plugin, including the plugin type. This interface is used to provide configuration options when registering a plugin. The plugin property specifies the type of the plugin being registered.

Extends​

Extended by​

Properties​

adapter​

adapter: WebSocketAdapterClass

The WebSocket adapter to use. Express or Fastify are supported.


connectTimeout?​

optional connectTimeout?: number

The number of ms before disconnecting a client that has not successfully joined a namespace.


path?​

optional path?: string

It is the name of the path that is captured on the server side.


plugin​

plugin: PluginType

Inherited from​

PluginOptions.plugin


port?​

optional port?: number

The port on which the WebSocket server will listen. Default is 3000.


serveClient?​

optional serveClient?: boolean

Whether to serve the client files. Default is true. If set to false, the client files will not be served.


useHttpPluginServer​

useHttpPluginServer: boolean

Whether to use the built-in HTTP server for WebSockets. Default is false. If set to true, the WebSocket server will be created using the built-in HTTP server.