constants connectionState - wxyz-abcd/node-haxball GitHub Wiki
ConnectionState
These values are used to track the current state of connection while joining a room. (Designed for the onConnectionStateChange(state, sdp)
callback in the commonParams
parameter of Room.join
function.) Here is its current definition:
const ConnectionState = {
ConnectingToMaster: 0,
ConnectingToPeer: 1,
AwaitingState: 2,
Active: 3,
ConnectionFailed: 4
};
You can get the corresponding text value of a connection state for the current language using the following code:
function getLanguageValue(state){
return API.Language.currentData.connectionStateTextMap[state];
}