
Chapter 342
• <HostPort> specifies the IP address and one or more port numbers for the adaptor to bind to.
The IP address and port number are separated by a colon. If you specify more than one port,
separate them with commas.
For example, a
<HostPort> tag might look like this:
<HostPort>12.34.56.78:1935, 443</HostPort>
You can set up the adaptor to listen on more than one IP address by specifying more than one
<HostPort> tag.
By default, Flash Communication Server uses port number 1935 for RTMP connections. You
may choose to use other ports. When there is a proxy server or firewall that allows only HTTP
content through, the server uses HTTP to transmit RTMP packets (this process is called
HTTP tunneling); if a connection through port 1935 fails, the server tries again using HTTP
and port 80. To explicitly use HTTP tunneling, you can configure the adaptor to listen on
port 80 in the
<HostPort> tag. Whichever port you use, be sure it is set to the “open” state.
When you change the port number, you must also change it in the client application’s
ActionScript
NetConnection call.
As a security precaution, when you specify an IP address in the
<HostPort> tag, the server will
not bind to (listen to) localhost. (The term localhost refers to the computer the server is
running on.) If you do not specify an address, the server will bind to both localhost and the
true IP address of the computer it is running on.
• <Allow>, <Deny>, and <Order> serve the same purposes as in the Server.xml file, but indicate
permissions specifically for this adaptor.
The following set of Adaptor.xml tags has been customized for real-world use. Up to five threads
can be created for the adaptor. The adaptor will bind to ports 1935 and 80 and will accept
connections from any IP address.
<Adaptor>
<ResourceLimits>
<MaxThreads>5</MaxThreads>
</ResourceLimits>
<HostPortList>
<HostPort>12.34.56.78:1935, 80</HostPort>
</HostPortList>
<Allow>all</Allow>
<Deny></Deny>
<Order>Deny,Allow</Order>
</Adaptor>
The Vhost.xml file
The Vhost.xml file configures a virtual host within an adaptor. Each virtual host must have its
own directory inside the adaptor directory.
The name of the directory must be the actual name of the virtual host, such as
streaming.macromedia.com. Each virtual host you define must map to a DNS entry, or another
name resolution such as a WINS address or a hosts file, that specifies an IP address on the server
computer.
Each adaptor must contain a _defaultVHost_ directory in addition to the custom virtual hosts
that you define. If a client application tries to connect to a virtual host that does not exist, the
server attempts to connect it to _defaultVHost_.
Commentaires sur ces manuels