| Package | com.electrotank.electroserver4.connection |
| Class | public class Connection |
| Inheritance | Connection AbstractConnection Observable |
| Method | Defined by | ||
|---|---|---|---|
|
Connection(tmpip:String, tmpport:Number, protocol:String)
Creates a new instance of the Connection class.
| Connection | ||
![]() |
addEventListener(mt:MessageType, funcName:String, scope:Object, first:Boolean = false):void
| Observable | |
![]() |
addListener(ob:Object):void
| Observable | |
![]() |
close():void
Closes the connection to the server.
| AbstractConnection | |
|
connect():void
Attempts to connect to the ip and port specified.
| Connection | ||
![]() |
dispatchEvent(eventOb:MessageImpl):void
| Observable | |
![]() |
getExpectedInboundId():Number
Gets the next expected inbound id.
| AbstractConnection | |
![]() |
getId():Number
Gets the connection id.
| AbstractConnection | |
![]() |
getIp():String
Gets the ip used.
| AbstractConnection | |
![]() |
getIsConnected():Boolean
Returns true if connected, false if not.
| AbstractConnection | |
![]() |
getNextOutboundId():Number
Gets the next outbound id.
| AbstractConnection | |
![]() |
getPort():Number
Gets the port used.
| AbstractConnection | |
![]() |
getProtocol():String
Gets the connection protocol.
| AbstractConnection | |
![]() |
notifyListeners(eventName:String, eventOb:Object):void
| Observable | |
![]() |
onPreClose():void
Used internally to tell whoever is listening that a connection close is happening.
| AbstractConnection | |
![]() |
onPreConnect(success:Boolean):void
Used internally to send an event to whoever is listening.
| AbstractConnection | |
|
onPreData(data:String):void
Used internally to tell whoever is listening that data has just arrived.
| Connection | ||
![]() |
removeEventListener(mt:MessageType, funcName:String, scope:Object):void
| Observable | |
![]() |
removeListener(ob:Object):void
| Observable | |
|
send(message:String):void
| Connection | ||
|
sendBinary(ba:ByteArray):void
| Connection | ||
![]() |
setExpectedInboundId(id:Number):void
Sets the next expected inbound id.
| AbstractConnection | |
![]() |
setId(id:Number):void
Sets the connection id.
| AbstractConnection | |
| Method | Defined by | ||
|---|---|---|---|
|
doClose():void
Closes the connection to the server.
| Connection | ||
| Connection | () | constructor |
public function Connection(tmpip:String, tmpport:Number, protocol:String)Creates a new instance of the Connection class.
Parameterstmpip:String — The ip to connect to.
|
|
tmpport:Number — The port to use.
|
|
protocol:String |
| connect | () | method |
public override function connect():voidAttempts to connect to the ip and port specified.
| doClose | () | method |
protected override function doClose():voidCloses the connection to the server.
| onPreData | () | method |
public function onPreData(data:String):voidUsed internally to tell whoever is listening that data has just arrived.
Parametersdata:String — The data.
|
| send | () | method |
public override function send(message:String):voidParameters
message:String |
| sendBinary | () | method |
public override function sendBinary(ba:ByteArray):voidParameters
ba:ByteArray |