Class: DimRpc 
Library: DIM
Author: C. Gaspar  
Version: v1.0 Update :Thu Feb 11 15:52:46 1999

Description :

    To be used by DIM Servers - Implements RPC Service creation.
    DimRpc constructors add a DIM Service of RPC type to the list of known services.
    The DimRpcs as DimServices will only be registered (published) and served after "Starting" the DimServer.
    Please refer to Usage for an example of DimRpc creation.

Constructors :

   First parameter is the Service Name.

Destructors : Public Functions :

    Handler: Gets Called when an RPC is requested by a Client (DimRpcInfo) 

   Get Methods: To be used inside rpcHandler in order to get the data received from the client     Set Methods: To be used inside rpcHandler in order to send the result back to the client  Usage :

    DimRpc example:

            #include "dis.hxx"

            class RpcInt : public DimRpc
            {

                 void rpcHandler()
                 {
                      int val;
                      val = getInt();
                      val++;
                      setData(val);
                 }
            public:
                 RpcInt(char *name): DimRpc(name,"I","I") { };
            };

            main()
            {
                 RpcInt testRpcInt("TESTRPC/INT");

                 DimServer::start("TESTRPC");
                 while(1)
                      pause();
            }
 


Last update : 02/11/99 15:53:02 by MkHelp 1.1.0