Game Development Reference
In-Depth Information
Figure 30.1 Relationship between the client, server, and shared vocabulary assemblies.
You should notice that PigLatinController is inheriting from MarshalByRefObject ,
which is necessary to make the object available to clients requesting it. Remoting
does not return a copy of the object; instead a proxy object is used to invoke meth-
ods in the remote object.
Every public method you define in the remote object will be available to clients,
with the same rules that would apply if the object were accessed locally in a system.
using System;
namespace PigLatinRemoting
{
public class PigLatinController : MarshalByRefObject
{
public string ConvertToPigLatin(string input)
{
}
}
}
As you can see in the preceding code, there is one public method the server will
make available to all clients requesting the proxy of this object.
Once the vocabulary is defined, a server must be created that registers the vocabu-
lary over a channel which clients will use to request the proxy. This is accomplished
Search Nedrilad ::




Custom Search