Just When You Thought It Was Over With

Published February 02, 2005
Advertisement
Holy Smokes.

Don't you just hate scope creep, especially when it's during the development phase and in the middle of programming?

Well I'm starting to, but at least the scope creep is a good thing in this case.

While working on the server template (If you don't know what this is, read previous journal entries), I realized that instead of copying and pasting tons of code later on, I should be implementing the socket thread pool and it's basic handling.

So with this I really opened a big can of whoop @$$ on myself. Not that I'm a beginning programmer or anything, but I haven't worked much with multi-threading or evn multi-threading sockets from a single listening socket. So I just headed to my favorite (for now) code site (Code Project) to look up some sample code to get me started. Whew. This topic is not only complex, but there are 20 people all with 20 ways of doing it. So back to the web search. Now I went to an old favorite (MSDN) and remembered why I quit going there. Oh yes, they have code but you have to locate 10 snippets to get any idea of what's going on and the recommended way of doing it.

So to cut the post short, I trying here to get some sample code or at least to get some questions answered to point me in the right direction.

But hey! If you've done this and want to help me (please help me), I could use a good code sample on threading with windows sockets in .NET.

See ya soon and you probably won't recognize me, but I'll be the person with less hair (from pulling it out). :-)
0 likes 2 comments

Comments

noaktree
Wish I did have more knowledge on sockets to give...but I don't. Good luck!
February 03, 2005 01:44 AM
wackatronic
Thanks anyway.

Being that it's not only sockets but also multi-threaded makes it more complex. The idea of a thread pool, with each thread controlling a socket connection is very mind blowing at this stage in the game. I'll post some sample code when I get the semantics developed and tested.
February 03, 2005 10:10 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement