Websocket Resources are core websocket connections between a client and server.
The WebsocketResource class is returned from window.waitForResource. It contains all properties of a Resource in addition to an ability to subscribe to messages sent back and forth.
The Http Upgrade request used to create this Websocket.
ResourceRequestA simulation of an HTTP response pieced together from the socket headers returned during a normal HTTP upgrade.
ResourceResponseThe Http Upgrade url.
stringThe type of resource.
ResourceType=WebSocketWas this request redirected
booleanInvalid call. Throws an Error. To subscribe to messages, see on('message', callback)
Promise<Buffer>WebsocketMessage => any)Called on each websocket message returned.
WebsocketMessage contain:string | Buffer - the contents of the messageserver | client - where the message originatedPromise<void>WebsocketMessage => any)Unsubscribe to messages.
Promise<void>WebsocketMessage => any)Subscribe to a single websocket message
Promise<void>WebsocketMessage => any)Alias for on('message', callback')
Promise<void>WebsocketMessage => any)Alias for off('message', callback')
Promise<void>Invalid call. Throws an Error. To subscribe to messages, see on('message', callback)
Promise<string>Invalid call. Throws an Error. To subscribe to messages, see on('message', callback)
Promise<json>