Valhalla Legends Forums Archive | Battle.net Bot Development | Overlapped I/O vs. I/O Completion Ports

AuthorMessageTime
Mephisto
Can someone please explain to me the fundamental differences between these two concepts and where each should be applied and if possible provide resources for both.  I have a vague understanding of I/O completion prots and rudimentary knowledge of overlapped I/O; enough to be able to develop small-scale applications such as a Battle.net bot which connects to Battle.net and processes and sends messages using it.
December 30, 2004, 8:46 AM
Mephisto
Hmm, was rather hoping some people would've commented on this by now.  Am I the only one who wants to know about these subjects?  I know there's people on these boards with knowledge pertaining to these two subjects (Kp, Skywing, ...).  Can you guys please share your input?  Sorry if I'm rude by being persistant on this, but I'd really like to know, and the internet doesn't seem to provide a lot of clear examples about completion ports, though I may be searching poorly.

Btw, I apologize for this subject being in the wrong place, but it was an accident for posting it here (I meant to post it in the C++ board); but regardless, it does pertain to here to some extent...and that doesn't take away the importance of these two subjects.  *blah*
January 3, 2005, 11:03 PM
kamakazie
I found these articles using google:

http://www.cswl.com/whiteppr/tech/rtime.html
http://www.sysinternals.com/ntw2k/info/comport.shtml

They should be of help ;)
January 4, 2005, 12:25 AM
Skywing
Completion ports are more efficient than compleletion routines, but there is absolutely no support for them on Win9x.

Completion routines are implemented with the standard APC queuing mechanism.  Completion ports are implemented as a queue in kernel mode that is specially optimized for fast retrieval of events by multiple threads.
January 4, 2005, 4:09 PM
UserLoser.
[quote author=OnlyMeat link=topic=10049.msg94310#msg94310 date=1104870574]
I looked into using them for my client apps but decided they are more suited for multithreaded tcp/ip servers.

Thats not to say they cant be used for clientside stuff but i prefer to use the WSASelectEvent API's mainly because it does the same job and i dont like restricting my users to the newer OS versions.
[/quote]

"Them" being?
January 4, 2005, 8:32 PM
Mephisto
So would my application's performance benefit from using completion ports instead of completion routines?  What are your recommendations when writing clientside software.
January 4, 2005, 10:39 PM
Myndfyr
[quote author=Mephisto link=topic=10049.msg94328#msg94328 date=1104878375]
So would my application's performance benefit from using completion ports instead of completion routines?  What are your recommendations when writing clientside software.
[/quote]

If what I read yesterday from a Google search was accurate (my post having been deleted), I don't believe you'll get much more than a minimal gain from it when your software is running on NT, because the routines are really just ports "under-the-hood" (in the kernel).  And since they're (ports) not available on 9x (as Skywing said), why not just go for routines?
January 5, 2005, 12:23 AM
Mephisto
Overlapped routines work fine on Win9x; they use the APC queueing method (as Skywing pointed out).  So I'm not sure if your source is entirely accurate (though it may be, perhaps you misunderstood it).
January 5, 2005, 12:42 AM

Search