XMLSocket Class — support for a continuous server/client TCP/IP connection
new XMLSocket( )
Terminate an open connection to a server application.
Attempt to establish a new connection to a server application.
Send an XML object hierarchy to a server application as a string.
Executes when the server terminates the connection.
Executes when a connection attempt completes.
Executes when data is received but has not yet been parsed as XML.
Executes when data has been received and parsed into an XML object hierarchy.
The majority of connections between Flash and a server have a very
short life span. When Flash requests external data via the
XML.load( ) functions, a
temporary communication channel is established. Data is sent over
that channel and then the channel is terminated. This kind of
short-term communication has many useful applications, but it is also
limited in two important ways:
Once the connection closes, the server has no way of contacting Flash. Flash must always initiate communication with the server.
Each time Flash obtains information from the server, a new connection must be opened. The time and processor load involved in opening repeated connections prevents Flash from engaging in anything near real-time transactions with a server.
As of Flash 5, we can overcome these limitations with the
XMLSocket class, ...