mitm-core / WebSocketContext
Type Alias: WebSocketContext
WebSocketContext =
object
Defined in: src/core/scope/types.ts:135
Contains WebSocket upgrade state and references to the client-side and upstream WebSocket endpoints.
Raw upgrade socket information is also available when applicable.
Properties
client?
optionalclient?:NodeWebSocket
Defined in: src/core/scope/types.ts:143
Client-side WebSocket endpoint, when available.
isUpgraded
isUpgraded:
boolean
Defined in: src/core/scope/types.ts:137
Indicates whether the WebSocket connection has been upgraded.
rawUpgradeSocket?
optionalrawUpgradeSocket?:Duplex
Defined in: src/core/scope/types.ts:149
Raw socket associated with the client-side upgrade, when available.
subprotocol?
optionalsubprotocol?:string
Defined in: src/core/scope/types.ts:140
Negotiated WebSocket subprotocol, when available.
upgradeHead?
optionalupgradeHead?:Buffer
Defined in: src/core/scope/types.ts:152
Unconsumed bytes received alongside the HTTP upgrade request, when available.
upstream?
optionalupstream?:NodeWebSocket
Defined in: src/core/scope/types.ts:146
Upstream WebSocket endpoint, when available.
