socket is an object of class socketObject that is automatically created by wrtc object whenever it needs a new websocket connection to the server.
The socket object opens a websocket to the RTCgate server takes care of websocket communication. Its wcw layer takes care of roaming and retransmissions.
Users usually do not need to do anything with the socket object.
Useful socket object properties:
| socket.additionalWaitBeforeNextWsOpen | additional wait time before next websocket open after failed open-attempt before (in seconds) |
| socket.channelReady | true if websocket is in connection with server |
| socket.line | line objects using this socket |
| socket.nam | socket object name |
| socket.objType | object type |
| socket.version_server_app | RTCgate server name |
| socket.version_server_ver | RTCgate server version |
In order to avoid malfunction please do not change any of the socket object's properties.
Socket objects are created automatically by the wrtc object. If you however for any reason want to create a new websocket connection manually call wrtc.i.createSocket() - it will create a new socket object and websocket connection. To close a socket object (and its websocket connection) call socket.stop().