My stress test app is pretty much done. But in order for me to give code to people, I'll have to give away half my source code. I'm going to rewrite it (again) to use plain old sockets, then I can just post the source code in a couple of files. Ukh.
I don't have nearly as much free time to code now, either. I get home from work at about 18:45, and by the time I get something to eat, check my forums, mail, etc and am ready to code, it's 19:30 - 20:00. So that gives me about 3 hours max to code. It's midnight now, and I have to get up at 8am. Ukh. Oh well, never mind.
The servers seem to be working fine. I haven't had any errors from them, or crashes or anything. The only problem I have had is connect() on my stress tester failing with winsock code 10061, presumably because 50 sockets try to connect at once and SYN flood the server, since it's listen() backlog is only 5. I'll try changing that and see if it helps. Even if it doesn't, it's not much of a problem. The client can just try to reconnect.
I found a couple of minor issues with message sizes in the server. I have a GameMessage struct, which just contains a message ID and a message length. Then I have derived classes that include more members, and I set the message ID and length accordingly. The server was setting the length wrongly for some messages (A few send a struct, then a string, for instance [E.g. chat messages]). E.g. GameMessage_Talk had it's length set to sizeof(GameMessage_Talk), but the message was sent, followed by a string, so the client messed up.
I just thought of something else I should add; I should count how many times a client has sent an unrecognised message in a row. If they send more than a couple, disconnect them, since it's likely someone trying to flood me with gibberish.
I also added a bunch of users and characters to my DB. 1000 users, each with 2 characters. It was actually pretty speedy. About 3 seconds to do all 3000 INSERTs (From my code). Although since I have a silly amount of indexes, my index for the characters table is larger than the data itself. I'm sure there's stuff I can remove: