| Package | com.electrotank.electroserver5.connection |
| Class | public class Connection |
| Inheritance | Connection flash.events.EventDispatcher |
| Subclasses | HttpConnection, RtmpConnection, SocketConnection, UdpConnection |
| Property | Defined By | ||
|---|---|---|---|
| connected : Boolean
Gets or set the connected propert
| Connection | ||
| connectionId : int
Gets or sets the connection id. | Connection | ||
| encryptionContext : DhAesEncryptionContext | Connection | ||
| hashId : int
Hash id used for password encryption
| Connection | ||
| host : String [read-only]
Returns the host name of the connection. | Connection | ||
| isPrimaryCapable : Boolean
Gets or sets the isPrimaryCapable property. | Connection | ||
| outboundId : Number [read-only]
Returns the outboundId for the last message sent. | Connection | ||
| port : int [read-only]
Returns the port used for the connection. | Connection | ||
| serverId : String [read-only]
Gets the id of the server this connection is associated with. | Connection | ||
| serverVersion : String
Full version number of the ES5 server
| Connection | ||
| transportType : String [read-only]
Gets the type of connection this is. | Connection | ||
| Method | Defined By | ||
|---|---|---|---|
Connection(availableConnection:AvailableConnection)
Creates a new instance. | Connection | ||
close():void
Closes the established connection. | Connection | ||
connect():void
Uses the connection information to attempt to establish a connection. | Connection | ||
decrementOutboundId():void
Decrements the outbound id. | Connection | ||
getNextOutboundId():Number
Gets the next outbound id by incrementing the current outboundId. | Connection | ||
send(data:ByteArray):void
Sends binary data over the established connection. | Connection | ||
| connected | property |
connected:BooleanGets or set the connected propert
public function get connected():Boolean public function set connected(value:Boolean):void| connectionId | property |
connectionId:intGets or sets the connection id.
public function get connectionId():int public function set connectionId(value:int):void| encryptionContext | property |
encryptionContext:DhAesEncryptionContext public function get encryptionContext():DhAesEncryptionContext public function set encryptionContext(value:DhAesEncryptionContext):void| hashId | property |
hashId:intHash id used for password encryption
public function get hashId():int public function set hashId(value:int):void| host | property |
host:String [read-only] Returns the host name of the connection.
public function get host():String| isPrimaryCapable | property |
isPrimaryCapable:BooleanGets or sets the isPrimaryCapable property. If true, then this connection is capable of being the only connection.
public function get isPrimaryCapable():Boolean public function set isPrimaryCapable(value:Boolean):void| outboundId | property |
outboundId:Number [read-only] Returns the outboundId for the last message sent.
public function get outboundId():Number| port | property |
port:int [read-only] Returns the port used for the connection.
public function get port():int| serverId | property |
serverId:String [read-only] Gets the id of the server this connection is associated with.
public function get serverId():String| serverVersion | property |
serverVersion:StringFull version number of the ES5 server
public function get serverVersion():String public function set serverVersion(value:String):void| transportType | property |
transportType:String [read-only] Gets the type of connection this is. The value is one of the values found in the TransportType class.
public function get transportType():String| Connection | () | Constructor |
public function Connection(availableConnection:AvailableConnection)Creates a new instance. Using the AvailableConnection instance passed in it sets the host, port, transport type, and server id as properties on this class.
ParametersavailableConnection:AvailableConnection — instance which holds the needed connection information.
|
| close | () | method |
public function close():voidCloses the established connection. This method needs to be overriden in each subclass.
| connect | () | method |
public function connect():voidUses the connection information to attempt to establish a connection. This method needs to be overridden in each subclass.
| decrementOutboundId | () | method |
public function decrementOutboundId():voidDecrements the outbound id. For use by EsEngine only.
| getNextOutboundId | () | method |
public function getNextOutboundId():NumberGets the next outbound id by incrementing the current outboundId.
ReturnsNumber — The next outbound id.
|
| send | () | method |
public function send(data:ByteArray):voidSends binary data over the established connection. This method needs to be overriden in each subclass.
Parameters
data:ByteArray — data to send.
|