MACROMEDIA FLASH MEDIA SERVER 2-CLIENT-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR FLASH MEDIA SERVER 2 Manual de usuario Pagina 107

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 172
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 106
104
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
Example
The following example defines a function for the onStatus() handler that outputs messages to indicate whether the
connection was successful:
nc = new NetConnection();
nc.onStatus = function(info){
if (info.code == "NetConnection.Connect.Success") {
_root.gotoAndStop(2);
} else {
if (! nc.isConnected){
_root.gotoAndStop(1);
}
}
};
NetConnection.rtmfpBindAddresses
nc.rtmfpBindAddresses
An Array of Strings representing the specific address or addresses that the NetConnection binds locally when it opens
its RTMFP protocol stack. This value is ignored for all other protocols. If you assign an
NetConnection.rtmfpEndpointName to a NetConnection, assign this property also so that other peers can interact
with the instance at a known IP address and port.
When assigning an Array of address Strings to this property, each String must specify an IPv4 or IPv6 address to bind
and listen on, optionally followed by a colon (":") and a UDP port number. To specify an IPv6 address and a port,
enclose the IPv6 address in square brackets. If no port value is specified, the next available system port is bound. Upon
successful bind, the String value in the property representing the address is updated to include the ephemeral port
number that has been bound.
By default, the RTMFP protocol stack binds "0.0.0.0" if connecting to an IPv4 RTMFP server, or "::" if connecting
to an IPv6 server when the computer, network and Adobe Media Server support IPv6. These values direct the RTMFP
protocol stack to listen on either all available IPv4 or IPv6 interfaces, but not both.To bind and listen on IPv4 and IPv6
interfaces concurrently, assign an Array of addresses such as:
["0.0.0.0:31000", "[::]:31000"]. In this example,
all local IPv4 and IPv6 interfaces are bound on port 31000. Use non-wildcard address values to selectively bind specific
interfaces rather than all of them.
This property can be read at any time but can only be set when the NetConnection is in a disconnected state and no
connect attempt is in progress.
This property throws an error if any arguments within the assigned Array are of the wrong type or missing, address
values are improperly formatted, or the NetConnection is connected or is in the process of connecting.
Binding happens after the NetConnection.connect() method is called. If a bind attempt fails, a
NetConnection.Connect.Failed event is dispatched, and details of the bind failure are logged to the application log.
NetConnection.Connect.Rejected error The client does not have permission to connect to the application, or
the application name specified during the connection attempt was not
found on the server. This information object also has an
application
property that contains the value returned by
application.rejectConnection().
NetConnection.Connect.Success status The connection attempt succeeded.
NetConnection.Proxy.NotResponding error The proxy server is not responding. See the ProxyStream class.
Code Level Meaning
Vista de pagina 106
1 2 ... 102 103 104 105 106 107 108 109 110 111 112 ... 171 172

Comentarios a estos manuales

Sin comentarios