MACROMEDIA FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE Reference page 104

Server-side actionscript language reference
Table of Contents

Advertisement

Description
Constructor; creates a new instance of the NetConnection class.
Example
The following example creates a new instance of the NetConnection class:
newNC = new NetConnection();
NetConnection.addHeader()
Availability
Flash Communication Server MX 1.0.
Usage
myNetConn.addHeader(name, mustUnderstand, object)
Parameters
A string; identifies the header and the ActionScript object data associated with it.
name
A Boolean value;
indicates that the server must understand and
mustUnderstand
true
process this header before it handles any of the following headers or messages.
Any ActionScript object.
object
Returns
Nothing.
Description
Method; adds a context header to the AMF packet structure. This header is sent with every
future AMF packet. If you call
using the same name, the new
NetConnection.addHeader()
header replaces the existing header, and the new header persists for the duration of the
NetConnection object. You can remove a header by calling
NetConnection.addHeader()
with the name of the header to remove and an undefined object.
Example
The following example creates a new NetConnection instance,
, and connects to an
nc
application at web server www.foo.com that is listening at port 1929. This application
dispatches the service /blag/SomeCoolService. The last line of code adds a header called
:
foo
nc=new NetConnection();
nc.connect("http://www.foo.com:1929/blag/SomeCoolService");
nc.addHeader("foo", true, new Foo());
104
Server-Side ActionScript Language Reference

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash media server 2

Table of Contents