Packagecom.aispeech.net
Classpublic class ConnectionBase
InheritanceConnectionBase Inheritance flash.events.EventDispatcher
Subclasses HttpConnection, RTMPConnection

Base class of Connection classes Implement common Connection class properties and methods Checkout the protected properties and methods for the details.



Public Properties
 PropertyDefined By
  connectionParams : ConnectionParams
[read-only]
ConnectionBase
  latency : int
ConnectionBase
  log : ConnectionLog
[read-only]
ConnectionBase
  sessionId : String
[read-only]
ConnectionBase
  state : String
[read-only]
ConnectionBase
  throughput : int
keep throughput average
ConnectionBase
Protected Properties
 PropertyDefined By
  _connectionLog : ConnectionLog
ConnectionBase
  _sessionId : String
ConnectionBase
  _state : String
ConnectionBase
  _testConnection : Boolean
ConnectionBase
  _timeoutTimerId : int
ConnectionBase
Public Methods
 MethodDefined By
  
ConnectionBase(connectionParams:ConnectionParams, testConnection:Boolean = false)
Base constructor Prepare connection params, state, event dispatcher
ConnectionBase
Protected Methods
 MethodDefined By
  
checkLatency(repeatCount:int = 1, delay:int = 300000):void
check latency
ConnectionBase
  
Connection timeout event handler
ConnectionBase
  
ConnectionBase
Property Detail
_connectionLogproperty
protected var _connectionLog:ConnectionLog

_sessionIdproperty 
protected var _sessionId:String

_stateproperty 
protected var _state:String

_testConnectionproperty 
protected var _testConnection:Boolean

_timeoutTimerIdproperty 
protected var _timeoutTimerId:int

connectionParamsproperty 
connectionParams:ConnectionParams  [read-only]


Implementation
    public function get connectionParams():ConnectionParams
latencyproperty 
latency:int


Implementation
    public function get latency():int
    public function set latency(value:int):void
logproperty 
log:ConnectionLog  [read-only]


Implementation
    public function get log():ConnectionLog
sessionIdproperty 
sessionId:String  [read-only]


Implementation
    public function get sessionId():String
stateproperty 
state:String  [read-only]


Implementation
    public function get state():String
throughputproperty 
throughput:int

keep throughput average


Implementation
    public function get throughput():int
    public function set throughput(value:int):void
Constructor Detail
ConnectionBase()Constructor
public function ConnectionBase(connectionParams:ConnectionParams, testConnection:Boolean = false)

Base constructor Prepare connection params, state, event dispatcher

Parameters
connectionParams:ConnectionParams
 
testConnection:Boolean (default = false)
Method Detail
checkLatency()method
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)

onConnectionTimeout()method 
protected function onConnectionTimeout():void

Connection timeout event handler

stopLatencyCheck()method 
protected function stopLatencyCheck():void