Creates a new socket connection.
Server address
GameHUD instance
Game HUD instance because we need to show updates to the user on the HUD about the connection.
Queue of all received packets from the server.
Queue of all packets to be sent to the server.
Websocket object.
State of socket.
Returns all Packets received from the server, waiting to be incorporated into game logic.
Array of received packets.
Check if socket is ready
true if ready
Enqueues a Packet to be sent to the server.
Packet to be sent to the server.
Sends all enqueued Packets heading to the server.
Generated using TypeDoc
WebSocket abstraction. Handling all communication with the server.