MACROMEDIA FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY Manual de usuario Pagina 37

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 80
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 36
Server-Side Communication ActionScript 37
Client.ip
Availability
Flash Communication Server MX.
Usage
Client.ip
Description
Property (read-only); contains the IP address of the Flash client.
Example
The following example uses the Client.ip property to verify whether a new client has a specific
IP address. The result determines which block of code runs.
application.onConnect = function(newClient, name){
if (newClient.ip == "127.0.0.1"){
// insert code here
} else {
// insert code here
}
};
Client.protocol
Availability
Flash Communication Server MX
Usage
Client.protocol
Description
Property (read-only); contains a string that indicates the protocol used by the client to connect to
the server. This string can have one of the following values:
rtmp (Real Time Message Protocol over persistent socket connection)
rtmpt (RTMP tunneled through HTTP protocol)
For more information about the HTTP tunneling feature in Flash Communication Server MX
see the
NetConnection.connect entry in the Client-Side Communication ActionScript Dictionary.
Example
The following checks the connection protocol used by a client upon connection to the
application.
application.onConnect(clientObj) {
if(clientObj.protocol == "rtmp") {
trace("Client connected over a persistent connection");
} else if(clientOjb.protocol == "rtmpt") {
trace("Client connected over an HTTP tunneling connection");
}
}
Vista de pagina 36
1 2 ... 32 33 34 35 36 37 38 39 40 41 42 ... 79 80

Comentarios a estos manuales

Sin comentarios