MACROMEDIA FLASH MEDIA SERVER 2-CLIENT-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR FLASH MEDIA SERVER 2 Manuale Utente Pagina 50

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 172
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 49
47
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
Availability
Flash Communication Server 1
Example
The following onConnect() function pings the connecting client and traces the results of the method:
application.onConnect(newClient) {
if (newClient.ping()){
trace("ping successful");
}
else {
trace("ping failed");
}
}
See also
Client.getStats()
Client.potentialNearAddresses
clientObject.potentialNearAddress
Read-only; the list of all public addresses of the server. The nearAddress is the public address of the interface to which
the client is connected. However the
potentialNearAdresses is the list of all the public interfaces that may be used
to communicate with the server this client is connected to.
Use this property to distribute peer introductions across multiple servers. See Distribute peer introductions across
multiple servers.
Availability
Flash Media Server 4.5
Example
The following example outputs all the potential near addresses of the server the client has connected to:
function logAllPotentialNearAddresses(client) {
var n = client.potentialNearAddresses.length;
trace("Client has " + n + " potential near addresses (at the server-end of its connection).");
for (var i = 0; i < n; ++i)
trace(" " + i + " : " + client.potentialNearAddresses[i] + "\n ");
}
Client.protocol
clientObject.protocol
Read-only; A string indicating the protocol used by the client to connect to the server. This string can have one of the
following values:
Vedere la pagina 49
1 2 ... 45 46 47 48 49 50 51 52 53 54 55 ... 171 172

Commenti su questo manuale

Nessun commento