Skip to content

Type Alias: UpgradeHandler

Makaio Framework


Makaio Framework / contracts / 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.

unknown

The incoming HTTP request that triggered the upgrade.

unknown

The raw network socket for the connection.

unknown

The first packet of the upgraded stream, buffered before the upgrade handler was attached.

void

  • UpgradeHandler
    • (request: unknown, socket: unknown, head: unknown) => void