Packagenet.user1.reactor
Classpublic final class ConnectionState
InheritanceConnectionState Inheritance Object

Since : Reactor 1.0.0

The ClientConnectionState class is an enumeration of constant values representing the state of a client's current connection to the server. To retrieve the current client's connection state, use ConnectionManager's getConnectionState() method. For example,
   reactor.getConnectionManager().getConnectionState();
   
To retrieve the connection state of any other client, use IClient's getConnectionState() method. For example, the following code retrieves the connection state for the client with clientID "24".
   reactor.getClientManager().getClient("24").getConnectionState();
   
To retrieve the connection state of a user account, use UserAccount's getConnectionState() method. For example, the following code retrieves the connection state for the user account with userID "bob".
   reactor.getAccountManager().getAccount("bob").getConnectionState();
   

See also

IClient.getConnectionState()


Public Constants
 ConstantDefined By
  CONNECTION_IN_PROGRESS : int = 2
[static] A connection state indicating that the client is attempting to connect to Union Server, but has not yet successfully negotiated a client/server handshake.
ConnectionState
  DISCONNECTION_IN_PROGRESS : int = 3
[static] A connection state indicating that the client has begun the process of disconnecting from Union Server.
ConnectionState
  LOGGED_IN : int = 4
[static] A connection state indicating that the client has a fully established connection to Union Server, has successfully negotiated a client/server handshake, and has successfully logged into a server-side user account.
ConnectionState
  NOT_CONNECTED : int = 0
[static] For the current client, NOT_CONNECTED means there is no active connection to Union Server, and no attempted connection or disconnection is in progress; for a UserAccount object, NOT_CONNECTED means that the account is not currently logged in.
ConnectionState
  READY : int = 1
[static] A connection state indicating that the client has a fully established connection to Union Server, and has successfully negotiated a client/server handshake.
ConnectionState
  UNKNOWN : int = -1
[static] A connection state indicating that the client's current connection state cannot be determined.
ConnectionState
Constant Descriptions
CONNECTION_IN_PROGRESSConstant
public static const CONNECTION_IN_PROGRESS:int = 2

Since : Reactor 1.0.0

A connection state indicating that the client is attempting to connect to Union Server, but has not yet successfully negotiated a client/server handshake.

DISCONNECTION_IN_PROGRESSConstant 
public static const DISCONNECTION_IN_PROGRESS:int = 3

Since : Reactor 1.0.0

A connection state indicating that the client has begun the process of disconnecting from Union Server.

LOGGED_INConstant 
public static const LOGGED_IN:int = 4

Since : Reactor 1.0.0

A connection state indicating that the client has a fully established connection to Union Server, has successfully negotiated a client/server handshake, and has successfully logged into a server-side user account.

See also

NOT_CONNECTEDConstant 
public static const NOT_CONNECTED:int = 0

Since : Reactor 1.0.0

For the current client, NOT_CONNECTED means there is no active connection to Union Server, and no attempted connection or disconnection is in progress; for a UserAccount object, NOT_CONNECTED means that the account is not currently logged in.

READYConstant 
public static const READY:int = 1

Since : Reactor 1.0.0

A connection state indicating that the client has a fully established connection to Union Server, and has successfully negotiated a client/server handshake.

See also

UNKNOWNConstant 
public static const UNKNOWN:int = -1

Since : Reactor 1.0.0

A connection state indicating that the client's current connection state cannot be determined. Connection state can become unknown when the current client is made aware of another client's existence (for example, by joining the same room as the other client), but then loses verifiable knowledge of the other client (for example, by leaving the room).

See also