Server-Side Communication ActionScript > Client.protocol

 

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");
	}
}