## Index

### Classes

- Server

### Interfaces

- AddressInfo
- ClientOptions
- CloseEvent
- ErrorEvent
- Event
- EventListenerOptions
- MessageEvent
- PerMessageDeflateOptions
- ServerOptions
- WebSocket
- WebSocketServer

### Type aliases

- CertMeta
- Data
- RawData
- VerifyClientCallbackAsync
- VerifyClientCallbackSync

### Variables

- WebSocket
- WebSocketServer

### Functions

- createWebSocketStream

## Type aliases

### CertMeta

CertMeta: string | string[] | <internal>.Buffer | <internal>.Buffer[]

CertMeta represents the accepted types for certificate & key data.

### Data

Data: string | <internal>.Buffer | ArrayBuffer | <internal>.Buffer[]

Data represents the message payload received over the WebSocket.

### RawData

RawData: <internal>.Buffer | ArrayBuffer | <internal>.Buffer[]

Data represents the raw message payload received over the WebSocket.

### VerifyClientCallbackAsync

VerifyClientCallbackAsync: (info: { origin: string; req: IncomingMessage; secure: boolean }, callback: (res: boolean, code?: number, message?: string, headers?: OutgoingHttpHeaders) => void) => void

#### Type declaration

- - (info: { origin: string; req: IncomingMessage; secure: boolean }, callback: (res: boolean, code?: number, message?: string, headers?: OutgoingHttpHeaders) => void): void

  - VerifyClientCallbackAsync is an asynchronous callback used to inspect the incoming message. The return value (boolean) of the function determines whether or not to accept the handshake.

    #### Parameters

    - ##### info: { origin: string; req: IncomingMessage; secure: boolean }

      - ##### origin: string

      - ##### req: IncomingMessage

      - ##### secure: boolean

    - ##### callback: (res: boolean, code?: number, message?: string, headers?: OutgoingHttpHeaders) => void

      - - (res: boolean, code?: number, message?: string, headers?: OutgoingHttpHeaders): void

        - #### Parameters

          - ##### res: boolean

          - ##### Optional code: number

          - ##### Optional message: string

          - ##### Optional headers: OutgoingHttpHeaders

          #### Returns void

### VerifyClientCallbackSync

VerifyClientCallbackSync: (info: { origin: string; req: IncomingMessage; secure: boolean }) => boolean

#### Type declaration

- - (info: { origin: string; req: IncomingMessage; secure: boolean }): boolean

  - VerifyClientCallbackSync is a synchronous callback used to inspect the incoming message. The return value (boolean) of the function determines whether or not to accept the handshake.

    #### Parameters

    - ##### info: { origin: string; req: IncomingMessage; secure: boolean }

      - ##### origin: string

      - ##### req: IncomingMessage

      - ##### secure: boolean

    #### Returns boolean

## Variables

### Const WebSocket

WebSocket: typeof <internal>.WebSocketAlias

### Const WebSocketServer

WebSocketServer: typeof <internal>.WebSocket.Server

## Functions

### createWebSocketStream

- createWebSocketStream(websocket: <internal>.WebSocket, options?: <internal>.DuplexOptions): <internal>.Duplex

- #### Parameters

  - ##### websocket: <internal>.WebSocket

  - ##### Optional options: <internal>.DuplexOptions

  #### Returns <internal>.Duplex

Generated using TypeDoc