Packagesekati.net
Classpublic class PersistentXMLSocket
InheritancePersistentXMLSocket Inheritance flash.net.XMLSocket

PersistentXMLSocket provides an advanced XMLSocket.

See also

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/XMLSocket.html


Public Properties
 PropertyDefined by
  autoReconnect : Boolean
Whether the socket will attempt to auto-reconnect on disconnect.
PersistentXMLSocket
  host : String
[read-only] XMLSocket host.
PersistentXMLSocket
  port : int
[read-only] XMLSocket port.
PersistentXMLSocket
  RECONNECT_DELAY : int = 30000
[static]
PersistentXMLSocket
  url : String
[read-only] The XMLSocket URL.
PersistentXMLSocket
Protected Properties
 PropertyDefined by
  _autoReconnect : Boolean
PersistentXMLSocket
  _host : String
PersistentXMLSocket
  _port : int
PersistentXMLSocket
  _reconnectInterval : int
PersistentXMLSocket
Public Methods
 MethodDefined by
  
PersistentXMLSocket(host:String, port:int, autoConnect:Boolean = true, autoReconnect:Boolean = true)
PersistentXMLSocket Constructor
PersistentXMLSocket
Protected Methods
 MethodDefined by
  
Clear any reconnect attempts.
PersistentXMLSocket
  
closeHandler(e:Event):void
Close Handler.
PersistentXMLSocket
  
Configure Socket listeners
PersistentXMLSocket
  
connectHandler(e:Event):void
Connect Handler.
PersistentXMLSocket
  
dataHandler(e:DataEvent):void
Data Handler.
PersistentXMLSocket
  
ioErrorHandler(e:IOErrorEvent):void
IO Error Handler.
PersistentXMLSocket
  
reconnect():void
Attempt to reconnect to the socket which closed the connection.
PersistentXMLSocket
  
securityErrorHandler(e:SecurityErrorEvent):void
Security Error Handler.
PersistentXMLSocket
Public Constants
 ConstantDefined by
  SOCKET_NULL_CHAR : String = "0"
[static]
PersistentXMLSocket
Property detail
_autoReconnectproperty
protected var _autoReconnect:Boolean
autoReconnectproperty 
autoReconnect:Boolean  [read-write]

Whether the socket will attempt to auto-reconnect on disconnect.

Implementation
    public function get autoReconnect():Boolean
    public function set autoReconnect(value:Boolean):void
_hostproperty 
protected var _host:String
hostproperty 
host:String  [read-only]

XMLSocket host.

Implementation
    public function get host():String
_portproperty 
protected var _port:int
portproperty 
port:int  [read-only]

XMLSocket port.

Implementation
    public function get port():int
RECONNECT_DELAYproperty 
public static var RECONNECT_DELAY:int = 30000
_reconnectIntervalproperty 
protected var _reconnectInterval:int
urlproperty 
url:String  [read-only]

The XMLSocket URL.

Implementation
    public function get url():String
Constructor detail
PersistentXMLSocket()constructor
public function PersistentXMLSocket(host:String, port:int, autoConnect:Boolean = true, autoReconnect:Boolean = true)

PersistentXMLSocket Constructor

Parameters
host:String — the hostname to connect the socket to.
 
port:int — the socket port on the host.
 
autoConnect:Boolean (default = true) — whether to automatically connect (true), or not (false).
 
autoReconnect:Boolean (default = true) — whether to automatically attempt reconnections once the connection is lost (true), or not (false).
Method detail
clearReconnectInterval()method
protected function clearReconnectInterval():void

Clear any reconnect attempts.

closeHandler()method 
protected function closeHandler(e:Event):void

Close Handler.

Parameters
e:Event
configureListeners()method 
protected function configureListeners():void

Configure Socket listeners

connectHandler()method 
protected function connectHandler(e:Event):void

Connect Handler.

Parameters
e:Event
dataHandler()method 
protected function dataHandler(e:DataEvent):void

Data Handler.

Parameters
e:DataEvent
ioErrorHandler()method 
protected function ioErrorHandler(e:IOErrorEvent):void

IO Error Handler.

Parameters
e:IOErrorEvent
reconnect()method 
protected function reconnect():void

Attempt to reconnect to the socket which closed the connection.

securityErrorHandler()method 
protected function securityErrorHandler(e:SecurityErrorEvent):void

Security Error Handler.

Parameters
e:SecurityErrorEvent
Constant detail
SOCKET_NULL_CHARconstant
public static const SOCKET_NULL_CHAR:String = "0"