views:

29

answers:

2

As I understand IOCP under Windows Server 2003/2008 and C++ programming, they are more-or-less the highest performance way to service either multiple sockets, instead of select, or to tie together multiple threads to service those requests.

If my program has but a single socket however, and given other constraints will generally read one packet, do work, then wait for another packet, does IOCP buy me anything?

It feels like just sitting in a recv() or equivalent would be at least as fast, if not faster in this specific case?

+1  A: 

Nope, in your case the extra complexity of IOCP doesn't sound warranted. At least, not unless you anticipate your program becoming more sophisticated in the near future...

Kaelin Colclasure
+1  A: 

No, in that situation IOCP is unlikely to add anything but complexity. Of course if you are already familiar with IOCP and you already have working code that you could use for this single connection system then there's no real reason not to use IOCP but if you've never used it before it wouldn't be worth the effort to learn it for a system such as you describe.

Len Holgate