Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WebSocketHandler

Base handler for websocket requests. By default, the request input and output body will be in a ReadableStream, because of interface consistency among middleware. If ReadableStream is not available, like in React-Native, the response body will be an async iterable.

Hierarchy

  • WebSocketHandler

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

  • new WebSocketHandler(__namedParameters?: { connectionTimeout: undefined | number }): WebSocketHandler
  • Parameters

    • Optional __namedParameters: { connectionTimeout: undefined | number }
      • connectionTimeout: undefined | number

    Returns WebSocketHandler

Properties

Readonly metadata

Methods

destroy

  • destroy(): void
  • Returns void

handle

  • handle(request: HttpRequest): Promise<{ response: HttpResponse }>
  • Parameters

    • request: HttpRequest

    Returns Promise<{ response: HttpResponse }>