Type Alias: UpgradeHandler
Makaio Framework / contracts / UpgradeHandler
Type Alias: UpgradeHandler
Section titled “Type Alias: UpgradeHandler”UpgradeHandler = (
request,socket,head) =>void
Defined in: ../../../packages/contracts/src/capabilities/server/types.ts:19
Handler invoked when an HTTP connection requests a protocol upgrade.
Follows the Node.js http.Server upgrade event signature so callers
can attach WebSocket or other protocol handlers without coupling to a
specific HTTP library.
Parameters
Section titled “Parameters”request
Section titled “request”unknown
The incoming HTTP request that triggered the upgrade.
socket
Section titled “socket”unknown
The raw network socket for the connection.
unknown
The first packet of the upgraded stream, buffered before the upgrade handler was attached.
Returns
Section titled “Returns”void
Type Composition
Section titled “Type Composition”UpgradeHandler(request: unknown, socket: unknown, head: unknown) => void