Closes the connection to Union Server.
The disconnect() method is not normally intended for direct use.
Returns the host on which the connection will be opened or has been opened.
The host name or ip, as a string.
Returns the port on which the connection will be opened or has been opened.
A number from 1 to 65535.
Returns the host that was requested for this connection via setServer(). If that host is a load balancing DNS server, the actual host used for the connection (as returned by getHost()) might differ from the requested host.
The requested host name or ip, as a string.
Returns the type of the connection, as one of the types specified by the ConnectionType class.
A string representing the connection type.
Indicates whether this connection is currently in a "ready" state.
Indicates whether this connection is considered valid. Valid connections are those that are currently in a "ready" state, or are currently disconnected but successfully achieved a "ready" state in the most recent connection attempt.
Assigns the Orbiter object for which this IConnection will provide server communication services. This method is invoked automatically by the ConnectionManager when the Connection object is added to the ConnectionManager's connection list.
Assigns the host and port to use with the connect() method.
The server address (typically an IP address or domain name).
A port number between 1 and 65536. Note that ports from 1-7 are normally reserved for use by the operating system!
The WebSocketConnection class is used by Orbiter to communicate with Union Server over a persistent TCP/IP socket. Normally, developers need not use the WebSocketConnection class directly, and should instead make connections via the Orbiter class's connect() method. However, the WebSocketConnection class is required for fine-grained connection configuration, such as defining failover socket connections for multiple Union Servers running at different host addresses.
By default, Orbiter uses WebSocketConnection connections to communicate with Union Server. WebSocketConnection connections offer faster response times than HTTP connections, but occupy an operating-system-level socket continuously for the duration of the connection. If a WebSocketConnection connection cannot be established (due to, say, a restrictive firewall), Orbiter automatically attempts to communicate using HTTP requests sent via an HTTPDirectConnection or HTTPIFrameConnection. Developers can override Orbiter's default connection failover system by manually configuring connections using the ConnectionManager class and Orbiter's disableHTTPFailover() method.
For secure WebSocket and HTTP communications, see SecureWebSocketConnection, SecureHTTPDirectConnection, and SecureHTTPIFrameConnection.