quote:Original post by Anonymous Poster
If you''re on the client, make your sockets non-blocking, and read them all each frame. There''s very little overhead in reading a nonblocking socket that has no data.
For servers, write a single thread, and have it select() over all sockets, reading from all the sockets that have data (they should still be non-blocking).
This is not only very efficient (both for client and server); it also ports very easily to UNIX.
Multi-threading is almost never worth it for something with as much inter-dependence as a game; the locking overhead will kill you.
i havent prged a mplyer game yet so i my not know what i''m talking about. but it would prb be better to have a seperate thread using blocking functions, so they wait until they get something and pipe it into whatever needs it. what locking overhead is there? if the critical section is tiny it should be better or the same as polling it.