FloooD / custom_cs2dsrv

Jermuk's custom Counter Strike 2D Server written in C and modified by FloooD and leegao.
173.192.35.85:36000
3 stars 0 forks source link

More formal scheduling scheme #6

Closed leegao closed 13 years ago

leegao commented 13 years ago

We can use a queue to keep track of future events and whatever and check these event queues at the end of each main loop to determine if anything needs to be done (sort of like a timer). We should also be able to insert the items/data in arbitrary order (ie, we have an event in a few seconds and another in around an hour such as a map change in the queue, we then insert another event taking place in a few minutes such as a round change, these would all go into the right position)

I've already implemented this queue using a heap structure and tested it (naively).

leegao commented 13 years ago

Example implementation of how to use a send queue for packet throttling and delayed packet sending is in the experimental branch, I'm testing it right now.

leegao commented 13 years ago

Tested and works in the latest version, a few sends not using SendPlayer will need to be added.

leegao commented 13 years ago

added and closed