
About Flash Communication Server 13
Remote shared object.
Remote shared objects are created on the client but are also available to the
server. They let you share data in real-time between multiple clients, and also store data for later
retrieval by the same or different applications. For more information about client-side remote
shared objects, see “Understanding shared objects” on page 14.
SharedObject object. Server-side shared objects let you communicate with client-side shared
objects and with objects on other Flash Communication Servers. For more information about
server-side shared objects, see “Understanding shared objects” on page 14.
Stream object. The server-side Stream object lets you handle each stream in a Flash
Communication Server application. The Flash Communication Server automatically creates a
Stream object when the
NetStream.play or NetStream.publish method is called in a client-
side script. You can also create a stream in server-side ActionScript by calling the
Stream.get
method. A user can access multiple streams at the same time, and there can be many Stream
objects active at the same time.
Client-server object communications
The following “object pairs” represent the potential connections you can establish between client-
side and server-side objects. For example, when a client-side NetConnection object connects to
the server, a server-side Client object is created; this Client object can then call methods of its
NetConnection object counterpart.
The following table shows the client-side and server-side objects that are associated with each
other.
In the following table, the client-side calls on the left invoke the server-side calls on the right.
In the following table, the server-side calls on the left invoke the client-side calls on the right.
Client-side object Corresponding server-side object
my_nc (NetConnection object) my_client (Client object or application.clients
object)
my_ns (NetStream object) my_server_stream (Stream object)
my_so (remote shared object) my_server_so (server-side shared object)
Client-side call Server-side call
my_nc.connect application.onConnect
my_nc.close application.onDisconnect
my_nc.call("doThing", myCallbackFcn, 1, "foo") my_client.doThing(1, "foo")
my_so.send("doThing", 1, "foo") my_server_so.doThing(1, "foo")
Server-side call Client-side call
my_client.call ("doThing", myCallbackFcn,
1, "foo")
my_nc.doThing (1, "foo")
my_server_stream.send ("doThing", 1,
"foo")
my_ns.doThing (1, "foo")
my_server_so.send("doThing", 1, "foo") my_so.doThing(1, "foo")
Comentarios a estos manuales