Dispatched when a connection attempt by an IConnection object begins. The ConnectionEvent.BEGIN_CONNECT event is followed by either a ConnectionEvent.BEGIN_HANDSHAKE event or a ConnectionEvent.CONNECT_FAILURE event. It indicates that the individual Connection object has started an attempt to connect to Union Server.
Dispatched when an IConnection object initiates the "handshake" phase of a Union Server connection. During the handshake phase, the connection identifies the client to the server by sending a CLIENT_HELLO UPC message, and then waits for the server's response. If the connection is successfully initialized, the ConnectionEvent.READY event will follow. If not, the ConnectionEvent.CONNECT_FAILURE event will follow.
Dispatched when an IConnection object's connection to the server is closed by the client. The ConnectionEvent.CLIENT_KILL_CONNECT event is always followed by the ConnectionEvent.DISCONNECT event.
Dispatched when a connection attempt by an Connection object fails. Common causes of connection failures are:
Dispatched when an IConnection object's connection to the server is closed. The ConnectionEvent.DISCONNECT is always preceded by either the ConnectionEvent.CLIENT_KILL_CONNECT event or the ConnectionEvent.SERVER_KILL_CONNECT, which indicate whether the client or server instigated the disconnection.
Dispatched when a Connection object achieves a fully initialized connection to the server. As a convenience, the ConnectionEvent.READY event, in turn, triggers a ConnectionManagerEvent.READY event, which triggers a OrbiterEvent.READY event.
Dispatched whenever any data is received from Union Server by an Connection object.
Dispatched when a UPC-formatted message is received by an Connection object.
Dispatched whenever any data is sent to Union Server over an Connection object.
Dispatched when an IConnection object's connection to the server is closed by the server. The ConnectionEvent.SERVER_KILL_CONNECT event is always followed by the ConnectionEvent.DISCONNECT event.
Dispatched when Union Server informs the client that a session id used in a message from the client refers to an unknown session.
Dispatched when Union Server informs the client that its session has been terminated.
Returns the data that was sent or received by the connection. The getData() method is available for the ConnectionEvent.SEND_DATA and ConnectionEvent.RECEIVE_DATA event only.
Returns the status of the event.
The getStatus() method is available for the ConnectionEvent.CONNECT_FAILURE event only.
Returns the UPC message that was received by the connection.
The getUPC() method is an internal tool used by MessageManager to extract information from UPC formatted messages. It is rarely, if ever, required by client developers.
The getUPC() method is available for the ConnectionEvent.RECEIVE_UPC event only.
ConnectionEvent is a simple data class used to pass information about a connection event to registered event-listeners. The ConnectionEvent class also defines constants representing the available connection events.