This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
112
|
Chapter 3: Managing Connections
The info.description property is often empty but for some messages contains
important additional information. When the server returns a “NetConnection.Con-
nect.Rejected” message, either the server or the application has rejected the connec-
tion. When an application rejects a connection, the server-side script writer has the
option to return an
application object to explain why. When the server rejects a con-
nection, it returns information in the
description property that explains why. A
rejected description message looks like this:
[ Server.Reject ] : (_defaultRoot_, _defaultVHost_) : Application (appName)
is not defined.
Table 3-3 lists the three types of server rejection messages included in the
description property.
Conclusion
Don’t underestimate the importance of mastering the art of managing connections.
The lessons learned in this chapter should serve you well in both designing and
debugging your applications and their connections. In later chapters, we’ll extend
the NetConnection object in other ways as the need arises. Now that we’ve done
some client-side scripting, it’s time to move on to scripting on the server.
Table 3-3. Description values for NetConnection.Connect.Rejected messages
Message Meaning
Server.Reject The server rejected the connection because the application did not exist, because of a con-
figuration error, or because of some other problem such as bad network data.
Resource.Limit.Exceeded The resource limits for the server, virtual host, or application have been exceeded. For
example, the maximum allowed number of instances or shared objects has been exceeded.
License.Limit.Exceeded The number of simultaneous client connections or bandwidth limit has been exceeded. See
the Preface for FlashCom licensing information.

Get Programming Flash Communication Server now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.