- onConnect(...)
- onDisconnect(...)
- onClientConnect(...) To make sure that no two thread manipulate the same data at the same time, all these event-methods that you are forced to implement on server and client will not be called unless you call keepAlive(...). That is these methods will be called from the same thread of execution as your MainLoop. This garanties that these methods can manipulate the gameworld data (on client or server). The threads started by the framework to handle sending, receiving and retransmitting packets will never touch the actual game-data, this only happens in the code you write, and this code will only be touched by one thread of execution.
Keeping the framework running
As explained earlier, you must call the keepAlive(...) method in your MainLoop. If you fail to do this very often, then the connection between server and client might drop, because the heartbeats sent out by the client are sent from there. This is not very convenient, and will likely be changed in the future.
[Next: Complete Test Application ]
Generated on Mon Feb 6 12:24:53 2006 for Ganef by
1.4.4