# NetConnection ActionScript Class

This class implements an NetConnection object. The NetConnection object opens a client connection to load an FLV video file from a local system. or a remote one using the RTMP or RTMPT protocols. RTMP connections use port 1935, and RTMPT connections use port 80.

This class was first introduced for swf v7. and the behaviour has recently changed slightly to allow the loading of files from external systems. Prior to this, it was required to pass NULL to this class. Gnash handles both cases. The older behaviour default is connecting to the local filesystem for the file.

The URL that can be passed to `connect()` in newer versions of the swf format is as follows:

          protocol:[//host][:port]/appname/[instanceName]

For protocol, specify either `RTMP` or `RTMPT`. If rtmp is specified, Flash Player will create a client connection. If `RTMPT` is specified, Flash Player will create an HTTP "tunneling" connection to the server.

You can omit the host parameter if the Flash movie is served from localhost. If the instanceName parameter is omitted, Flash Player connects to the application's default instance (_definst_).

## The Methods of the Class

the same host where Flash Communication Server is installed
NetConnection.connect(const char *)

  Connect to a local or remote system to load a FLV file. Arg can be NULL, or an URL.

## NetConnection Class Conformance

Class Name | Conformance
--- | ---
NetConnection.connect() | This method is partially implemented. It can only be used in conjunction with the NetStream and Video classes, it cannot load a FLV file by itself.