16.Approaching the moment of every RMI call

In ProudNet, there is a functionality that allows you to approach the moment of RMI being called. Using this functionality, you can do following things.

그림 16-1Example of approaching the moment of every RMI call

16.1Approaching Transmission (Proxy) call

A way to approach to the moment when transmission is being called is like below.

When you do there, the overridden method will be called at each transmission is made.

Fundamentaly Proud::IRmiProxy::NotifySendByProxy is set to call but to increase the performance, there are times that you want to stop the call. At those times, all you need to is to set false for Proud.IRmiProxy.m_enableNotifySendByProxy.

16.2Approaching the moment of reception (Stub) call

Approaching to reception being called can be done as followed.

When you set as above, the overridden method will be called at every reception. Proud.IRmiStub.BeforeRmiInvocation will be called just before RMI execution and then Proud.IRmiStub.AfterRmiInvocation will be called when the execution is done. Using above would help spotting RMI that causes slowdown of server performance due to long operation time.

Also, you can output all parameters of RMI function being received from Stub by following the below steps.

16.3Concealing the name of RMI

ProudNet is set to store the names of RMI on the executable file to display them on Proud.IRmiStub.BeforeRmiInvocation. But for security reason, you can conceal their name if you want as following the next steps.

Before doing #include for ..._proxy.cpp, one of PIDL compiled results, you can define as below.

#define HIDE_RMI_NAME_STRING

But, when this method is used, no RMI names can be displayed on Proud.IRmiStub.BeforeRmiInvocation thus please think again before you actually use it.