Sample examples
Client
- Proxy & Stub
// Client -> Server RMI Proxy instance
Simple::Proxy g_SimpleProxy;
// Unlike an RMI proxy, it is used after overriding a function.
class SimpleStub : public Simple::Stub
{
public:
DECRMI_Simple_ShowChat;
DECRMI_Simple_SystemChat;
DECRMI_Simple_P2PChat;
};
// RMI stub instance for receiving messages
SimpleStub g_SimpleStub;using namespace Nettention.Proud;
// An RMI proxy is used to send messages.
// The function call is executed in a different process.
static Simple.Proxy g_Proxy = new Simple.Proxy();
// The RMI stub is used to receive messages.
static Simple.Stub g_Stub = new Simple.Stub();- Defining RMI functions
- Create a NetClient object
- Connecting Events
- Proxy & Stub Registration
- Connect to a server
Server
- Proxy & Stub
- Defining RMI functions
- Create a NetServer object
- Connecting Events
- Proxy & Stub Registration
Start a server
Common
- vars.h
- vars.cpp, vars.cs
Last updated