A class representing a specific WebSocket connection. This class represent a specific WebSocket connection, you can do lower level operations with it. You can choose to write to the socket in binary or text mode, and you can recognize the mode used for writing by the other peer. Close this WebSocket connection, actively disconnecting the peer. Returns the IP Address of the connected peer. (Not available in HTML5 export) Returns the remote port of the connected peer. (Not available in HTML5 export) Get the current selected write mode. See [enum WriteMode]. Returns [code]true[/code] if this peer is currently connected. Sets the socket to use the given [enum WriteMode]. Returns [code]true[/code] if the last received packet was sent as a text payload. See [enum WriteMode] Specify that WebSockets messages should be transferred as text payload (only valid UTF-8 is allowed). Specify that WebSockets messages should be transferred as binary payload (any byte combination is allowed).