Proud::INetCoreEvent Class Referenceabstract
Inheritance diagram for Proud::INetCoreEvent:

Public Member Functions

virtual void OnError (ErrorInfo *errorInfo)=0
 
virtual void OnWarning (ErrorInfo *errorInfo)=0
 
virtual void OnInformation (ErrorInfo *errorInfo)=0
 
virtual void OnException (const Exception &e)=0
 
virtual void OnNoRmiProcessed (RmiID rmiID)=0
 
virtual PROUD_API void OnReceiveUserMessage (HostID sender, const RmiContext &rmiContext, uint8_t *payload, int payloadLength)
 
virtual void OnTick (void *)
 
virtual void OnUserWorkerThreadCallbackBegin (CUserWorkerThreadCallbackContext *)
 
virtual void OnUserWorkerThreadCallbackEnd (CUserWorkerThreadCallbackContext *)
 

Detailed Description

Event sink for ProudNet

  • Use it with derivation class

Member Function Documentation

virtual void Proud::INetCoreEvent::OnError ( ErrorInfo errorInfo)
pure virtual

TODO:translate needed. It is called when an internal error is called.

Parameters
errorInfoError information. You can easily obtain the necessary information through ErrorInfo::ToString(). More details are in the ErrorInfo help.
virtual void Proud::INetCoreEvent::OnException ( const Exception e)
pure virtual

Merge to Proud.Exception

  • It handles error that occur from user code.
  • User realize things that user needed.
  • You can use Exceptiontype that obtain Exception object.
  • It process _com_error, void*, std::exception, etc. Also there is OnUnhandledException() that handle catch(...)
  • void* can obtain exceptional object type by casting. For example, it uses obtaining MFC CException.
virtual void Proud::INetCoreEvent::OnInformation ( ErrorInfo errorInfo)
pure virtual

TODO:translate needed. It is called when an internal notification is called. This is for internal status tracing, etc. and does not mean a problem situation.

Parameters
errorInfoError information. You can easily obtain the necessary information through ErrorInfo::ToString(). More details are in the ErrorInfo help.
virtual void Proud::INetCoreEvent::OnNoRmiProcessed ( RmiID  rmiID)
pure virtual

When RMI is called but there is no RMI in Stub that attached then this will callback.

virtual PROUD_API void Proud::INetCoreEvent::OnReceiveUserMessage ( HostID  sender,
const RmiContext rmiContext,
uint8_t *  payload,
int  payloadLength 
)
virtual

This function will callback once user received defined message. Then user can process as overriding this function. Please refer to Exchanging user-defined message without using RMI at all for more detail.

  • We recommend to use override keyword on Visual Studio 2005 or above.
Parameters
senderHost that sent message.
rmiContextAdditional information of receiving
payloadMain text of received message.
payloadLengthLength(byte) of received main text.
virtual void Proud::INetCoreEvent::OnTick ( void *  )
inlinevirtual

Function called back at user worker thread pool periodically. This is a Managing Timer loop RMI Event from server function.

Parameters
contextsame as the value entered at CStartLanServerParameter.m_timerCallbackContext
virtual void Proud::INetCoreEvent::OnUserWorkerThreadCallbackBegin ( CUserWorkerThreadCallbackContext )
inlinevirtual

It calls before calling callback at user worker because of RMI calling or event occuring. You can use it for measuring program running performance.

virtual void Proud::INetCoreEvent::OnUserWorkerThreadCallbackEnd ( CUserWorkerThreadCallbackContext )
inlinevirtual

It calls right after calling callback at user worker because of RMI calling or event occuring. You can use it for measuring program running performance.

virtual void Proud::INetCoreEvent::OnWarning ( ErrorInfo errorInfo)
pure virtual

TODO:translate needed. It is called when an internal warning is called. This reports a problem on a lower level than an error.

Parameters
errorInfoError information. You can easily obtain the necessary information through ErrorInfo::ToString(). More details are in the ErrorInfo help.