Closes the connection with the server.
Asynchronous method that establishes connection with the server.
Host and port to connect to.
Callback function for close
event. Rejects the promise of the incoming message with ConnectionClosed.
Close code sent by the server.
Reason why the server closed the connection.
Callback function for error
event. Rejects the promise of the incoming message with ConnectionError.
See WebSocketConnection.onerror
Thrown exception.
Callback function for message
event. Resolves the promise of the incoming message.
See WebSocketConnection.onmessage
Message received from the server (plus type).
Callback function wrapping the socket's sending mechanism. See WebSocketConnection#sendUTF
Command to be sent to the server.
Generated using TypeDoc
WebSocket client that consumes an API wrapping OpenAI Gym or gym-like environments such as Gym Retro or Unity ML-Agents. Currently the best server is its counterpart Gymie-Server 😉