Base class of Connection classes
Implement common Connection class properties and methods
Checkout the protected properties and methods for the details.
protected var _connectionLog:ConnectionLog
protected var _sessionId:String
protected var _state:String
protected var _testConnection:Boolean
protected var _timeoutTimerId:int
connectionParams:ConnectionParams
[read-only]
Implementation public function get connectionParams():ConnectionParams
latency:int
Implementation public function get latency():int
public function set latency(value:int):void
log:ConnectionLog
[read-only]
Implementation public function get log():ConnectionLog
sessionId:String
[read-only]
Implementation public function get sessionId():String
state:String
[read-only]
Implementation public function get state():String
throughput:int
keep throughput average
Implementation public function get throughput():int
public function set throughput(value:int):void
public function ConnectionBase(connectionParams:ConnectionParams , testConnection:Boolean = false)
Base constructor
Prepare
connection params,
state,
event dispatcher
Parameters protected function checkLatency(repeatCount:int = 1, delay:int = 300000):void
check latency
Parameters
repeatCount :int
(default = 1
)
— default 1, only once; 0 means keep repeating
delay :int
(default = 300000
)
— unit ms, default 300000 (5 min)
protected function onConnectionTimeout():void
Connection timeout event handler
protected function stopLatencyCheck():void
Copyright 2011-2012 AI Speech Ltd Tue Mar 26 2013, 01:05 PM +08:00