Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Programming
You last visited: Today at 04:04

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Winsock multiplexing, IOCP vs overlapped

Discussion on Winsock multiplexing, IOCP vs overlapped within the CO2 Programming forum part of the Conquer Online 2 category.

Reply
 
Old   #1


 
KraHen's Avatar
 
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 794
Winsock multiplexing, IOCP vs overlapped

I am aware that I will probably get flamed for this, perhaps trivial question, I realize that I`m pretty much new to these concepts, and I don`t grasp them as I would like to yet.

I am doing some winsock practice, and I would like to implement an actual server architecture using it, and I am debating between the iocp and the overlapped models. I understand that IOCP provides better performance, but if I`m right, which I`m unsure of, the overlapped i/o technique would provide greater scalability on long term, which would affect performance as well on larger scales. I`m still giving IOCP a better mark, but I`d like to ask wht you guys think about this.
KraHen is offline  
Old 03/23/2012, 23:16   #2
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,191
You can always make a pre-compiler, conditional directive and just have both of them working in your source. That way, if your server ends up getting larger, you can just switch between them. I'd definitely go with the overlap model though (personally). The overlap model is built for multiple asynchronous connections. It'd be perfect for any (large) game server. This is C++ you're talking about, right?
Spirited is offline  
Old 03/24/2012, 14:19   #3


 
KraHen's Avatar
 
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 794
We`re both idiots I guess, because it turns out that you have to use IOCP in an overlapped context. )
KraHen is offline  
Old 03/24/2012, 15:02   #4


 
CptSky's Avatar
 
elite*gold: 0
Join Date: Jan 2008
Posts: 1,443
Received Thanks: 1,175
It may be interesting to read:

Talk of major I/O strategies for Winsock.
CptSky is offline  
Old 03/24/2012, 15:42   #5


 
KraHen's Avatar
 
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 794
I`m right now working on a multithreaded implementation based on IOCP so I can handle sockets asynchronously without WSAAsyncSelect and overlapped sockets of course, so the maximal amount of threads spawned will be NUMBER_OF_PROCESSORS * 2, and it scales pretty well as far as I can tell.

Also turns out that Boost provides a pretty robust networking interface as well, which is cross platform too, so I might as well just use that.
KraHen is offline  
Reply


Similar Threads Similar Threads
[Advanced] Winsock in C#
05/23/2013 - CO2 Programming - 7 Replies
Requires ws2_32.dll, and "using System.Runtime.InteropServices" // fuck creating my own socketerror enum LOL using SocketError = System.Net.Sockets.SocketError; // Interface to ws2_32.dll public unsafe partial class Native
[TUT]Winsock & VB.NET
11/21/2011 - Coding Tutorials - 0 Replies
Ich hab eben mal die sufu benutzt und bemerkt das viele Leute noch probleme mit winsock haben seti vb.NET da dies eigentlic hdafür abgeschafft wurde. So geht es aber tortzdem (1 CLIENT NUR!) Als erstes machen wir eine Winsock oberfläche auf die neue Form, wer kein winsock komponente hat macht dies mswinsock.ocx downloaden 32 BIT -> kopiert die mswinsock.ocx nach C:/Windows/System32/ dann cmd als ADMIN AUSFÜHREN! und regsvr32 mswinsck.ocx, oder wie ihr sie genannt habt eingeben. VS,...
[C++] Winsock + Select
12/03/2009 - C/C++ - 13 Replies
I solved this Problem adding a "continue;" at if(FD_ISSET(aSocket, &fdSet)) { AddSocket(accept(aSocket, NULL, NULL)); continue; }
winsock in vb.net?
12/29/2007 - Conquer Online 2 - 4 Replies
anyone know how to get winsock into vb.net?ive been googleing for an answer and cant findone. i downloaded oswinsock and still not sure how to use it?? Ive been using vb6 for a while and am using vb 2005 for the first time and this is pissing me off.i read i should use systemcom.net or somthing? just anyone know how i can use winsock in vb.net or explain what i need to do,before i give up on this .net framework and stick with my trusty vb6 if anyone has a simple source proxy in...
vb6 winsock tutorial
10/24/2006 - .NET Languages - 2 Replies
Ich weiß, vb6 ist aaaaaaaalllt und 2005 ist sooooo besser (kann ich auch gleich zu C# gehen), aber fürs erste will ich das noch probieren. Okay, ich suche ein Winsock tutorial was allerdings direkt HEX packets schickt/verarbeitet und nicht im ASCII format, ich hab zwar ein paar Beispiel sources, allerdings versteh ich nicht so recht wie ich das machen soll. Also ne TCP verbindung.



All times are GMT +1. The time now is 04:05.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.