Packageorg.igniterealtime.xiff.core
Classpublic class XMPPRTMPConnection
InheritanceXMPPRTMPConnection Inheritance XMPPConnection Inheritance flash.events.EventDispatcher
Implements IXMPPConnection

A child of XMPPConnection, this class makes use of the Flash RTMP connection instead of the Socket.

See also

org.igniterealtime.xiff.core.XMPPConnection


Public Properties
 PropertyDefined By
 Inheritedactive : Boolean
Determines whether the connection with the server is currently active.
XMPPConnection
 Inheritedcompress : Boolean
Shall the Stream Compression be allowed if the server supports it.
XMPPConnection
 Inheritedcompressor : ICompressor
The class that is to be used for Stream Compression if enabled.
XMPPConnection
 Inheriteddomain : String
The XMPP domain to use with the server.
XMPPConnection
 InheritedincomingBytes : uint
[read-only] Get the total count of the received bytes in the current session.
XMPPConnection
 Inheritedjid : UnescapedJID
[read-only] Gets the fully qualified unescaped JID of the user.
XMPPConnection
 InheritedloggedIn : Boolean
Determines whether the user is connected and logged into the server.
XMPPConnection
 InheritedopenConnections : Array
[static] [read-only] Reference to all active connections.
XMPPConnection
 InheritedoutgoingBytes : uint
[read-only] Get the total count of the bytes sent in the current session.
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
 InheritedregistrationSupported : Boolean
[read-only] Does the connection support registration.
XMPPConnection
 Inheritedresource : String
The resource to use when logging in.
XMPPConnection
 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
Protected Properties
 PropertyDefined By
 InheritedclosingStreamTag : String
Depending of the STREAM_TYPE_used in the connect() method, this variable will contain a matching closing element for it.
XMPPConnection
 Inherited_compressor : ICompressor = null
Static class that is used to handle the compression
XMPPConnection
 InheritedexpireTagSearch : Boolean = false
Once received data from the socket, should the closing tag be seached? Initially this should be true as for the first incoming data there might be an error available.
XMPPConnection
 InheritedfeaturesAvailable : XML
Features as provided by the server, in their original XML form.
XMPPConnection
 InheritedopeningStreamTag : String
Opening part of the stream tag, such as <stream:stream or <flash:stream
XMPPConnection
 InheritedpendingIQs : Object
Hash to hold callbacks for IQs
XMPPConnection
 InheritedpingNotSupported : Boolean
Server supports keeping the connection alive with Ping extension
XMPPConnection
 InheritedpresenceQueue : Array
List of incoming presences that are waiting to be dispatched
XMPPConnection
 Inherited_registrationSupported : Boolean = false
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
 InheritedstreamTagSearch : String = stream:stream
Depending of the STREAM_TYPE_used in the connect() method, the name of the opening tag for stream is saved in this variable, such as stream:stream or flash:stream.
XMPPConnection
 InheritedtlsEnabled : Boolean = false
XMPPConnection
 InheritedtlsRequired : Boolean = false
Even if this class is not implementing TLS, it needs to be aware if it has been extended by XMPPTLSConnection that will set this value to true.
XMPPConnection
Public Methods
 MethodDefined By
  
XMPPRTMPConnection(url:String = rtmp:/xmpp)
XMPPRTMPConnection
  
connect(streamType:uint = 0):void
[override]
XMPPRTMPConnection
 Inherited
disableExtensions(... exts):void
Disable the given extensions from the registery.
XMPPConnection
 Inherited
disableSASLMechanism(name:String):void
Remove a SASL mechanism from this connection
XMPPConnection
  
disconnect():void
[override]
XMPPRTMPConnection
 Inherited
enableExtensions(... exts):void
Enable the given extensions for interacting with the incoming data.
XMPPConnection
 Inherited
enableSASLMechanism(name:String, authClass:Class):void
Add a SASL mechanism available for this connection
XMPPConnection
 Inherited
send(data:IXMPPStanza):void
Sends data to the server.
XMPPConnection
  
[override] No need for keepalive
XMPPRTMPConnection
  
xmppRecieve(rawXML:String):void
Is the name of this method locked in the server side?
XMPPRTMPConnection
Protected Methods
 MethodDefined By
 Inherited
SASL Authentication should been set up, begin the authentication process by sending the initial request.
XMPPConnection
 Inherited
Upon being so informed that resource binding is required, the client MUST bind a resource to the stream by sending to the server an IQ stanza of type "set" (see IQ Semantics (Section 9.2.3)) containing data qualified by the 'urn:ietf:params:xml:ns:xmpp-bind' namespace.
XMPPConnection
 Inherited
checkIncomingData(bytedata:ByteArray):XML
Check if the incoming data is complete once added to any existing incoming data.
XMPPConnection
 Inherited
chooseStreamTags(type:uint):void
Choose the stream start and ending tags based on the given type.
XMPPConnection
 Inherited
configureAuthMechanisms(mechanisms:XML):void
Use the authentication which is first in the list (saslMechanisms) if possible.
XMPPConnection
 Inherited
configureStreamCompression(method:String = zlib):void
Zlib is the most common and the one which is required to be implemented in case Stream Compression is used.
XMPPConnection
  
[override] Called from XMPPConnection() constructor.
XMPPRTMPConnection
 Inherited
dispatchError(condition:String, message:String, type:String, code:int = 0, extension:Extension = null):void
XMPPConnection
 Inherited
Runs after binding
XMPPConnection
 Inherited
flushPresenceQueue(event:TimerEvent):void
Dispatches a single PresenceEvent in case there are any in the queue.
XMPPConnection
 Inherited
handleAuthentication(response:XML):void
Upon receiving a success indication within the SASL negotiation, the client MUST send a new stream header to the server, to which the server MUST respond with a stream header as well as a list of available stream features.
XMPPConnection
 Inherited
handleMessage(node:XML):void
TODO: Add similar extension handling as in IQ, after message specific extensions are separated from Message class, v3.2.0
XMPPConnection
 Inherited
handleNodeType(node:XML):void
Calls a appropriate parser base on the nodeName.
XMPPConnection
 Inherited
Handle the incoming Presence either with the queue timer or directly dispatching the PresenceEvent.
XMPPConnection
 Inherited
handleStream(node:XML):void
Initial stream element has been received once this method is called.
XMPPConnection
 Inherited
handleStreamError(node:XML):void
Handle stream error related element.
XMPPConnection
 Inherited
handleStreamFeatures(node:XML):void
Handle features that are available in the connected server.
XMPPConnection
 Inherited
handleStreamTLS(node:XML):void
Checks if the TLS feature available is required or not and dispatches an error in case it is.
XMPPConnection
 Inherited
onIOError(event:IOErrorEvent):void
This fires the standard dispatchError method
XMPPConnection
 Inherited
parseDataReceived(bytedata:ByteArray):void
Parses the data which the socket just received.
XMPPConnection
 Inherited
Remove those listeners that the createConnection method added.
XMPPConnection
  
[override]
XMPPRTMPConnection
 Inherited
sendData(data:String):void
Dispatches OutgoingDataEvent, handles possible Stream Compression and calls sendDataToServer.
XMPPConnection
  
sendDataToServer(data:ByteArray):void
[override]
XMPPRTMPConnection
 Inherited
sendXML(data:String):void
Pass through to sendData which takes care of the common data handling between all connection classes.
XMPPConnection
 Inherited
Send a response to the Service Discovery query.
XMPPConnection
Events
 Event Summary Defined By
 Inherited
Dispatched on incoming IQ data that has an enabled extension.XMPPConnection
 InheritedDispatched when the connection is successfully made to the server.XMPPConnection
 InheritedDispatched when there is a disconnection from the server.XMPPConnection
 InheritedDispatched when there is some type of XMPP error.XMPPConnection
 InheritedDispatched whenever there is incoming XML data.XMPPConnection
 InheritedDispatched on successful authentication (login) with the server.XMPPConnection
 InheritedDispatched on incoming messages.XMPPConnection
 InheritedDispatched whenever data is sent to the server.XMPPConnection
 InheritedDispatched on incoming presence data.XMPPConnection
Public Constants
 ConstantDefined By
 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
Protected Constants
 ConstantDefined By
 InheritedsaslMechanisms : Object
The types of SASL mechanisms available.
XMPPConnection
Constructor Detail
XMPPRTMPConnection()Constructor
public function XMPPRTMPConnection(url:String = rtmp:/xmpp)

Parameters
url:String (default = rtmp:/xmpp)
Method Detail
connect()method
override public function connect(streamType:uint = 0):void

Parameters

streamType:uint (default = 0)

createConnection()method 
override protected function createConnection():void

Called from XMPPConnection() constructor.

disconnect()method 
override public function disconnect():void

restartStream()method 
override protected function restartStream():void

sendDataToServer()method 
override protected function sendDataToServer(data:ByteArray):void

Parameters

data:ByteArray

sendKeepAlive()method 
override public function sendKeepAlive():void

No need for keepalive

xmppRecieve()method 
public function xmppRecieve(rawXML:String):void

Is the name of this method locked in the server side?

Parameters

rawXML:String