The server and the client all do event handling. The event handling of Proud is made in a delegate pattern.
If you want to do an event handling, you need to implement by inheriting Proud.INetClientEvent in the client. In the server, you need to implement by inheriting Proud.INetServerEvent class. The two classes are inheriting Proud.INetCoreEvent class. This also needs to be implemented.
And then after making an instance of the implemented class, it must be connected through Proud.CNetServer.SetEventSink in the server and Proud.CNetClient.SetEventSink in the client.
If you use a complier that supports C++11, it is better to use the Lambda expression, instead of inheriting a class as shown above. You can do more concise programming.
For the time you are able to receive an event callback through the above steps, please refer to Understanding server main loop and Understanding client main loop.
Typical events that are generated in the server are ‘getting connection from the client’, etc. and the typical events that are generated in the client are ‘connection successful to the server’, ‘participation of a P2P member’, etc.
The most common problem in technical support is not being able to find a cause due to not processing the log. Especially for the functions where errorInfo is added as a parameter and the events below must be log processed.
If you use errorInfo->ToString() of errorInfo, which is a parameter, you can easily get information on any problem.