Arbitrary user data may be attached to this object
Forcefully closes this WebSocket
See HttpResponse.cork
Gracefully closes this WebSocket. Immediately calls close handler.
Returns the bytes buffered in backpressure.
Returns the remote IP address
Sends a ping control message. Returns true on success, see WebSocket.send. This helper function correlates to WebSocket::send(message, uWS::OpCode::PING, ...).
Publish a message to a topic in MQTT syntax
Sends a message. Make sure to check getBufferedAmount() before sending. Returns true for success, false for built up backpressure that will drain when time is given.
Subscribe to a topic in MQTT syntax
Unsubscribe from a topic. Returns true on success, if the WebSocket was subscribed.
Unsubscribe from all topics.
Generated using TypeDoc
A WebSocket connection that is valid from open to close event