Packageorg.openvideoplayer.net
Interfacepublic interface INetConnection extends flash.events.IEventDispatcher
Implementors OvpConnection

The INetConnection interface declares the properties and methods for a class implementing NetConnection behavior.



Public Properties
 PropertyDefined By
  connected : Boolean
[read-only] Indicates whether the application is connected to a server through a persistent RTMP connection (true) or not (false).
INetConnection
  connectedProxyType : String
[read-only] If a successful connection is made, indicates the method that was used to make it: a direct connection, the CONNECT method, or HTTP tunneling.
INetConnection
  objectEncoding : uint
The object encoding for this NetConnection instance.
INetConnection
  proxyType : String
Determines which fallback methods are tried if an initial connection attempt to the server fails.
INetConnection
  uri : String
[read-only] The URI passed to the NetConnection.connect() method.
INetConnection
  usingTLS : Boolean
[read-only] Indicates whether a secure connection was made using native Transport Layer Security (TLS) rather than HTTPS.
INetConnection
Public Methods
 MethodDefined By
  
addHeader(operation:String, mustUnderstand:Boolean = false, param:Object = null):void
Adds a context header to the Action Message Format (AMF) packet structure.
INetConnection
  
call(command:String, responder:Responder, ... arguments):void
Invokes a command or method on Flash Media Server or on an application server running Flash Remoting.
INetConnection
  
close():void
Closes the connection that was opened locally or to the server and dispatches a netStatus event with a code property of NetConnection.Connect.Closed.
INetConnection
  
connect(command:String, ... arguments):void
Creates a bidirectional connection between a Flash Player or an AIR application and a Flash Media Server application.
INetConnection
Events
 Event Summary Defined By
  Dispatched when an exception is thrown asynchronously — that is, from native asynchronous code.INetConnection
  Dispatched when an input or output error occurs that causes a network operation to fail.INetConnection
  Dispatched when a NetConnection object is reporting its status or error condition.INetConnection
  Dispatched if a call to NetConnection.call() attempts to connect to a server outside the caller's security sandbox.INetConnection
Property Detail
connectedproperty
connected:Boolean  [read-only]

Indicates whether the application is connected to a server through a persistent RTMP connection (true) or not (false).


Implementation
    public function get connected():Boolean
connectedProxyTypeproperty 
connectedProxyType:String  [read-only]

If a successful connection is made, indicates the method that was used to make it: a direct connection, the CONNECT method, or HTTP tunneling.


Implementation
    public function get connectedProxyType():String
objectEncodingproperty 
objectEncoding:uint

The object encoding for this NetConnection instance.


Implementation
    public function get objectEncoding():uint
    public function set objectEncoding(value:uint):void
proxyTypeproperty 
proxyType:String

Determines which fallback methods are tried if an initial connection attempt to the server fails.


Implementation
    public function get proxyType():String
    public function set proxyType(value:String):void
uriproperty 
uri:String  [read-only]

The URI passed to the NetConnection.connect() method.


Implementation
    public function get uri():String
usingTLSproperty 
usingTLS:Boolean  [read-only]

Indicates whether a secure connection was made using native Transport Layer Security (TLS) rather than HTTPS.


Implementation
    public function get usingTLS():Boolean
Method Detail
addHeader()method
public function addHeader(operation:String, mustUnderstand:Boolean = false, param:Object = null):void

Adds a context header to the Action Message Format (AMF) packet structure.

Parameters

operation:String
 
mustUnderstand:Boolean (default = false)
 
param:Object (default = null)

call()method 
public function call(command:String, responder:Responder, ... arguments):void

Invokes a command or method on Flash Media Server or on an application server running Flash Remoting.

Parameters

command:String
 
responder:Responder
 
... arguments

close()method 
public function close():void

Closes the connection that was opened locally or to the server and dispatches a netStatus event with a code property of NetConnection.Connect.Closed.

connect()method 
public function connect(command:String, ... arguments):void

Creates a bidirectional connection between a Flash Player or an AIR application and a Flash Media Server application.

Parameters

command:String
 
... arguments

Event Detail
asyncError Event
Event Object Type: flash.events.AsyncErrorEvent.ASYNC_ERROR
ASYNC_ERROR.type property = flash.events.AsyncErrorEvent.ASYNC_ERROR

Dispatched when an exception is thrown asynchronously — that is, from native asynchronous code.

ioError Event  
Event Object Type: flash.events.IOErrorEvent.IO_ERROR
IO_ERROR.type property = flash.events.IOErrorEvent.IO_ERROR

Dispatched when an input or output error occurs that causes a network operation to fail.

netStatus Event  
Event Object Type: flash.events.NetStatusEvent.NET_STATUS
NET_STATUS.type property = flash.events.NetStatusEvent.NET_STATUS

Dispatched when a NetConnection object is reporting its status or error condition.

securityError Event  
Event Object Type: flash.events.SecurityErrorEvent.SECURITY_ERROR

Dispatched if a call to NetConnection.call() attempts to connect to a server outside the caller's security sandbox.