Archived

This topic is now archived and is closed to further replies.

stefu

Polling in DP8?

Recommended Posts

Hello, I use DP8 for networking. Some events like loading track and cars mustn''t be done in DP message handler because they take few seconds, so I have to save the message and process it at the beginning of frame in main thread. They also write in DP8 SDK samples that any time consuming shouldn''t be done in DP message handler. So I thought that it would be ok to use polling method at the beginning of the frame. This is also my first networking app and I''ve faced some problems using multiple threads. How is the polling system best done in DP8?

Share this post


Link to post
Share on other sites
For optimal performance you need a circular message queue for incoming messages, and then you empty and handle all the messages in the queue, say, every 50ms from the main game thread.

Magmai Kai Holmlor
- Not For Rent

Share this post


Link to post
Share on other sites