🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

I'm on my lunch break

posted in DruinkJournal
Published March 13, 2006
Advertisement
How exciting.

I did some work to TEH MMORPG!!1 stress tester. It now runs clients in individual threads. However, since I use async sockets, the window message pump that feeds my sockets has to run from the main thread. Which might not seem like a problem, except that my socket class isn't thread safe. I added some basic synchronization, but you still can't safely read from the sockets buffer. The buffer is a std::vector, which is filled from the main thread in the window proc. And all my code for reading from it just returns a pointer to the first element of the vector. Bad idea.
So, I now need to write a thread safe reading function, that'll take the mutex, copy it into a buffer, and return the buffer.
I also need a critical section for each thread, in theory. I might just use one global critical section though, since this'll hardly be used multithreaded.

The servers are almost done. They can handle chat messages, clients changing zones, and clients entering/leaving. The only thing remaining is to save charcter data when a client disconnects. So that'll take 5 mins or so to actualy write. After that, I need to do some more work to the stress tester. I'd also like to try moving my database to an external host, such as another server / web hosting / whatever. Just for fun. The login server should really run on the same machine as the DB anyway. Maybe. I dunno.

Right, back to State of Emergency 2....

Previous Entry Meh
Next Entry Yay, code
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement