• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 9. Remote Methods > 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-way—once 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.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint