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 (Exception &e)=0
 
virtual void OnNoRmiProcessed (RmiID rmiID)=0
 
virtual 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 will be called when error is occured internally.

Parameters
errorInfoError message string
virtual void Proud::INetCoreEvent::OnException ( 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 will be called when internal alram is occured. It means tracking situation of internal, not warning situation.

Parameters
resultType of alram
remoteWhat kind of remote host
whereWhere it occur from
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 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 will be called when warning is occured internally. It reports problem that lower critical than error.

Parameters
resultType of alram
remoteWhat kind of remote host
whereWhere it occur from