Section 9.2. The send( ) and call( ) Methods

9.2. The send( ) and call( ) Methods

The stream and shared object send( ) methods both provide a mechanism to send method invocation requests to multiple movies at the same time. Both send( ) methods are one-wayonce the method is invoked on the Stream , NetStream , or SharedObject , no result can be collected. We can only hope that the method existed and that it ran successfully.

This chapter introduces the call( ) method of the NetConnection and Client classes. The call( ) methods provide a way to invoke a method on one recipient at a time. Unlike send( ) , call( ) makes it possible to receive the return value of a remote method. The call( ) method can invoke methods on numerous objects attached to the Client or NetConnection objects (we'll see how). The call( ) method provides fine-grained messaging control from client to server to clients , if necessary, and has advantages and disadvantages in securing an application (as elaborated upon in Chapter 18). Using send( ) has been described in detail in Chapter 5 and Chapter 8, so this chapter focuses almost entirely on the call( ) method. However, the methods are complementary and, as you will see, may be used together.



Programming Flash Communication Server
Programming Flash Communication Server
ISBN: 0596005040
EAN: 2147483647
Year: 2003
Pages: 203

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net