Name

NetConnection Class

Synopsis

                     myNetConnectionObject.methodName(params)

Methods

addHeader( )

Adds a header to every AMF packet in this connection.

call( )

Invokes a service method on the remote server.

clone( )

Creates a clone of a NetConnection object, without headers.

close( )

Closes the NetConnection object.

connect( )

Defines the URL used in a Flash Remoting connection.

getDebugConfig( )

Retrieves a NetDebugConfig object with all subscribed events.

getDebugId( )

Retrieves the NetConnection object’s debug identifier.

getService( )

Creates a service object that acts as a proxy to a remote service method.

ReplaceGatewayUrl( )

Changes the gateway URL for the current connection.

RequestPersistentHeader( )

A method that can be initiated by a server-side service to add a header to the request packets.

setCredentials( )

Creates a credentials header that is attached to each AMF packet.

setDebugId( )

Creates a user-defined debug identifier.

trace( )

Sends output to the NetConnection Debugger panel.

Only the public methods of the NetConnection class are shown. Many of the methods require the inclusion of the NetDebug.as or NetServices.as file, as indicated in the footnotes.

Description

The NetConnection class is at the heart of Flash Remoting. The class is a core part of Flash MX after the installation of the Flash Remoting components; however, the NetServices.as and NetDebug.as files add several methods to the NetConnection class, as noted under the Methods heading.

A NetConnection object allows communication between ...

Get Flash Remoting: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.