Packageorg.igniterealtime.xiff.core
Classpublic class XMPPBOSHConnection
InheritanceXMPPBOSHConnection Inheritance XMPPConnection Inheritance flash.events.EventDispatcher
ImplementsIXMPPConnection

Bidirectional-streams Over Synchronous HTTP (BOSH)

Using BOSH do not prevent your application from respecting Adobe Flash Player policy file issues. HTTP requests to your server must be authorized with a crossdomain.xml file in your webserver root.

For eJabberd users : if your crossdomain policy file cannot be served by your server, this issue can be solved with an Apache proxy redirect so that any automatic Flash/Flex calls to an URL like http://xmppserver:5280/crossdomain.xml will be redirected as an URL of your choice such as http://webserver/crossdomain.xml

Warning: if you are using BOSH through HTTPS, your crossdomain policy file must also be served through HTTPS. Your application (if online) must also be served through HTTPS else you will have a crossdomain policy issue. This issue can be solved by using the secure property of the allow-access-from node in the crossdomain.xml file. But this is not recommended by Adobe.

See also

http://xmpp.org/extensions/xep-0124.html
http://xmpp.org/extensions/xep-0206.html


Public Properties
 PropertyDefined by
  boshPath : String
XMPPBOSHConnection
 Inheritedcompress : Boolean
Shall the zlib compression be allowed if the server supports it.
XMPPConnection
 Inheriteddomain : String
The XMPP domain to use with the server.
XMPPConnection
  hold : uint
XMPPBOSHConnection
  httpServer : String
[read-only] Server URI
XMPPBOSHConnection
 InheritedignoreWhitespace : Boolean
Determines whether whitespace will be ignored on incoming XML data.
XMPPConnection
 InheritedincomingBytes : uint
Get the count of the received bytes.
XMPPConnection
 Inheritedjid : UnescapedJID
Gets the fully qualified unescaped JID of the user.
XMPPConnection
  maxConcurrentRequests : uint
XMPPBOSHConnection
 InheritedopenConnections : Array
[static] Reference to all active connections.
XMPPConnection
 InheritedoutgoingBytes : uint
Get the count of current bytes sent by this connection
XMPPConnection
 Inheritedpassword : String
The password to use when logging in.
XMPPConnection
 Inheritedport : uint
The port to use when connecting.
XMPPConnection
 InheritedqueuePresences : Boolean
Should the connection queue presence events for a small interval so that it can send multiple in a batch?
XMPPConnection
 Inheritedresource : String
The resource to use when logging in.
XMPPConnection
  secure : Boolean
HTTP bind requests type.
XMPPBOSHConnection
 Inheritedserver : String
The XMPP server to use for connection.
XMPPConnection
 InheriteduseAnonymousLogin : Boolean
Whether to use anonymous login or not.
XMPPConnection
 Inheritedusername : String
The username to use for connection.
XMPPConnection
  wait : uint
XMPPBOSHConnection
Protected Properties
 PropertyDefined by
 Inheritedactive : Boolean
XMPPConnection
 Inherited_server : String
Server to connect, could be different of the login domain.
XMPPConnection
 Inheritedsocket : Socket
Binary socket used to connect to the XMPP server.
XMPPConnection
Public Methods
 MethodDefined by
  
XMPPBOSHConnection(secure:Boolean = false)
XMPPBOSHConnection
 Inherited
changePassword(password:String):void
Changes the user's account password on the server.
XMPPConnection
  
connect(streamType:uint = 0):Boolean
XMPPBOSHConnection
 Inherited
disableSASLMechanism(name:String):void
[static] Remove a SASL mechanism.
XMPPConnection
  
disconnect():void
XMPPBOSHConnection
 Inherited
Issues a request for the information that must be submitted for registration with the server.
XMPPConnection
 Inherited
isActive():Boolean
Determines whether the connection with the server is currently active.
XMPPConnection
 Inherited
isLoggedIn():Boolean
Determines whether the user is connected and logged into the server.
XMPPConnection
  
pauseSession(seconds:uint):Boolean
XMPPBOSHConnection
  
processConnectionResponse(responseBody:XMLNode):void
XMPPBOSHConnection
 Inherited
registerSASLMechanism(name:String, authClass:Class):void
[static] Add a SASL mechanism.
XMPPConnection
 Inherited
send(data:IXMPPStanza):void
Sends data to the server.
XMPPConnection
  
XMPPBOSHConnection
 Inherited
sendRegistrationFields(fieldMap:Object, key:String):void
Registers a new account with the server, sending the registration data as specified in the fieldMap
XMPPConnection
Protected Methods
 MethodDefined by
  
handleNodeType(node:XMLNode):void
XMPPBOSHConnection
  
XMPPBOSHConnection
  
sendXML(someData:*):void
XMPPBOSHConnection
Events
 EventSummaryDefined by
 Inherited Dispatched when a password change is successful.XMPPConnection
 Inherited Dispatched when the connection is successfully made to the server.XMPPConnection
 Inherited Dispatched when there is a disconnection from the server.XMPPConnection
 Inherited Dispatched when there is some type of XMPP error.XMPPConnection
 Inherited Dispatched whenever there is incoming XML data.XMPPConnection
 Inherited Dispatched on successful authentication (login) with the server.XMPPConnection
 Inherited Dispatched on incoming messages.XMPPConnection
 Inherited Dispatched whenever data is sent to the server.XMPPConnection
 Inherited Dispatched on incoming presence data.XMPPConnection
 Inherited Dispatched on when new user account registration is successful.XMPPConnection
Public Constants
 ConstantDefined by
  BOSH_VERSION : String = "1.6"
[static]
XMPPBOSHConnection
  HTTP_PORT : uint = 7070
[static] The default port as per XMPP specification.
XMPPBOSHConnection
  HTTPS_PORT : uint = 7443
[static] The default secure port as per XMPP specification.
XMPPBOSHConnection
 InheritedSTREAM_TYPE_FLASH : uint = 2
[static] Stream type lets user set opening/closing tag.
XMPPConnection
 InheritedSTREAM_TYPE_FLASH_TERMINATED : uint = 3
[static] Stream type lets user set opening/closing tag.
XMPPConnection
 InheritedSTREAM_TYPE_STANDARD : uint = 0
[static] Stream type lets user set opening/closing tag.
XMPPConnection
 InheritedSTREAM_TYPE_STANDARD_TERMINATED : uint = 1
[static] Stream type lets user set opening/closing tag.
XMPPConnection
Property detail
boshPathproperty
boshPath:String  [read-write]

Implementation
    public function get boshPath():String
    public function set boshPath(value:String):void
holdproperty 
hold:uint  [read-write]

Implementation
    public function get hold():uint
    public function set hold(value:uint):void
httpServerproperty 
httpServer:String  [read-only]

Server URI

Implementation
    public function get httpServer():String
maxConcurrentRequestsproperty 
maxConcurrentRequests:uint  [read-write]

Implementation
    public function get maxConcurrentRequests():uint
    public function set maxConcurrentRequests(value:uint):void
secureproperty 
secure:Boolean  [read-write]

HTTP bind requests type. If secure, the requests will be sent through HTTPS. If not, through HTTP.

Implementation
    public function get secure():Boolean
    public function set secure(value:Boolean):void
waitproperty 
wait:uint  [read-write]

Implementation
    public function get wait():uint
    public function set wait(value:uint):void
Constructor detail
XMPPBOSHConnection()constructor
public function XMPPBOSHConnection(secure:Boolean = false)

Parameters
secure:Boolean (default = false) — Determines which port is used
Method detail
connect()method
public override function connect(streamType:uint = 0):BooleanParameters
streamType:uint (default = 0)

Returns
Boolean
disconnect()method 
public override function disconnect():void
handleNodeType()method 
protected override function handleNodeType(node:XMLNode):voidParameters
node:XMLNode
pauseSession()method 
public function pauseSession(seconds:uint):Boolean

Parameters
seconds:uint

Returns
Boolean — true if pause request is sent
processConnectionResponse()method 
public function processConnectionResponse(responseBody:XMLNode):void

Parameters
responseBody:XMLNode
restartStream()method 
protected override function restartStream():void
sendKeepAlive()method 
public override function sendKeepAlive():void
sendXML()method 
protected override function sendXML(someData:*):voidParameters
someData:*
Constant detail
BOSH_VERSIONconstant
public static const BOSH_VERSION:String = "1.6"

The default value is 1.6.

HTTP_PORTconstant 
public static const HTTP_PORT:uint = 7070

The default port as per XMPP specification.

The default value is 7070.

HTTPS_PORTconstant 
public static const HTTPS_PORT:uint = 7443

The default secure port as per XMPP specification.

The default value is 7443.