regarding threads i have to admit i didnt understand them well till your pointing tutorial... another thing to learn

regarding memory leak just look at your code is not enough, i got more programming/admin/study stuff in my head, so i dont think pure look will suffice... that's why Valgrind.

regarding DOS attack i can quickly imagine only 2 DOS attacks.. one is overflow socket with too many packets (so responce delay should help.. aka sleep() ), second is that packets are too big (that's why to truncate big data)...

regarding last point, i dont talk about multiple clients here... i talk about multiple games in 1 process and each game can have multiple players... this is something completely different and only substitute i see here is some kind of clustering.