On Saturday, 22. January 2011 17:22:44 Ismael Garrido wrote: > I don't see how to send the packets out in accurate enough timing > without threads. As far as I tested, currently FlushPacketQueue is > called in irregular intervals.
That's why one uses the select() syscall for asynchronous I/O. > So what does happen if you lower it, but not enough for a "server > frame to gone by"? Uhh.. nothing except that you clog more of the CPU? > Does the server send packets in fixed intervals or are they replies of > packets received? Fixed intervals if I recall correctly, namely at intervals of (1f / sv_fps) seconds. > How do you ensure correct timing and stable ping? > Where would you put the sending of the packets? (ie, in which > loop/function?) If you don't know already what select() does, and how it works, I would encourage you to learn about it. This is the key where it waits for data on the socket, and where you have have to set the timeout correctly in order to send the delayed packets at the correct times. -- Thilo Schulz
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ ioquake3 mailing list ioquake3@lists.ioquake.org http://lists.ioquake.org/listinfo.cgi/ioquake3-ioquake.org By sending this message I agree to love ioquake3 and libsdl.