Sign in to follow this  
  • entries
    557
  • comments
    1237
  • views
    421591

.pindrop

Sign in to follow this  
Evil Steve

101 views

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...
Sign in to follow this  


2 Comments


Recommended Comments

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

Share this comment


Link to comment
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).

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now