🎉 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!

.pindrop

posted in DruinkJournal
Published June 27, 2006
Advertisement
It's all quiet in here, everyone's gone off to lunch, but I want to get this shitting socket code done.

I got a new PC at work today (yaaaaay). This one has 3 times the amount of memory and is about 2.5 times faster. On the plus side, it's faster. On the minus side, it means I'll be on GDNet less, since I no longer have time to post between compiles...

My socket code is nearly complete. I got connect code working yesterday on the way home, and then realised that my listen/connect thread just needs to be a listen thread, since connect notifications will go to the worker threads along with read, write and close. So I tidied up my code a bit and made the listen thread totally different from the worker threads. I'm currently fixing the thread sorting code, so it's a bit more balanced, and probably more robust.

This time, I mutex lock every thread (Yeah, I know that's A Bad Thing), process any add/remove socket notifications (it makes my life easier, I've got less to worry about), count the total number of connections, work out how many threads that should take, and then load-balance it a bit.
Anyway, I'm getting back to my code...
Previous Entry Hangovers are bad
Next Entry Nearly...
0 likes 2 comments

Comments

jollyjeffers
Quote: Original post by Evil Steve
On the minus side, it means I'll be on GDNet less
I'm sorry, but that's simply unacceptable - The DirectX forum needs you (Imagine that classic US uncle-sam(?) poster).

Jack

June 27, 2006 07:44 AM
Evil Steve
I've alread ybeen told off for being on forums too much. A compile and link (compiling one file of a 100 - 1000 lines) used to take upwards of 3 minutes. Now it's done in about 30 seconds - that gave me time to quickly check GDNet between compiles. Since I'm used to my "change a number, compile, debug" cycle that I usually use on my own projects, I used to have a lot of time where I couldn't do anything else till the code had compiled (Unless I was updating my work log or other small work-related tasks that quickly run out).
June 27, 2006 01:48 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement