Any good Multithreaded Winsock tutorials out there?

Started by
4 comments, last by nPawn 20 years, 3 months ago
preferably talking about the server side, where new processes get spun off as people connect (That''s the way to get the best results, right?). Having a hard time picturing the best way to design the network engine so these threads work well with the main class and app.
Advertisement
Ok, if no good tutorials, can anyone give a rundown of how the data should flow from the server individual client connection thread to the main app? Should it go through the class, or through WM messages, or ??
Check out CodeProject code section.

Kuphryn
> {...} where new processes get spun off as people connect
> (That's the way to get the best results, right?).

{Assuming Linux}

That's probably the *worst* solution. Check out Kegel's C10K article on designing efficient servers for *nix systems along with a taxonomy of all the available solutions.

{Assuming Win32}

Spawning hundreds of processes is the worst way to utilize Windows. There is IOCP (I/O Completion Port) which is very scalable, but it works using threads. Check out this link for a discussion of the available solutions on this platform. There are this link and this link for IOCP discussions specifically.

-cb

[edited by - cbenoi1 on January 16, 2004 9:54:50 AM]
If you''re not opposed to spending a little money on books, I''ve found two here recently with some good information. MUD Game Programming includes a cross-platform (Win32 & Linux) Multithreading library and Networking API. For those of us working on MMORPG''s, it''s also got some really good architecture/design information.

I found a recommendation for the other book, Advanced Programming using Direct X 9 by Peter Walsh, here in this forum and received my copy yesterday. The networking chapter fills in some of the holes of the MUD book (which is all TCP/IP) by explaining one way to do reliable, ordered messaging with UDP.

Your mileage may vary.

bpopp (bpopp.net)
wow, thanks for all the links, some really good information, which i''m still digging through. My game will probably have anywhere from 30-200 players at once, so from the looks of the "Which I/O method should I use" FAQ I should go with the Asynchronous method for my server(?). Thanks again for the help.

This topic is closed to new replies.

Advertisement