Click here to Skip to main content
15,886,689 members
Everything / IOCP

IOCP

IOCP

Great Reads

by Marek Strihavka
BBQ - Writing highly scalable Windows Socket server
by danah gaz
A lightweight, high performance, easy to use asynchronous stream copy method using IOCP with progress, throughput tracking, and no explicit thread creation.

Latest Articles

by Marek Strihavka
BBQ - Writing highly scalable Windows Socket server
by danah gaz
A lightweight, high performance, easy to use asynchronous stream copy method using IOCP with progress, throughput tracking, and no explicit thread creation.

All Articles

Sort by Score

IOCP 

7 Jun 2016 by Marek Strihavka
BBQ - Writing highly scalable Windows Socket server
26 Jul 2013 by User 59241
Without the actual code and more info about environment it is very difficult to guess what is happening.Are you starting with the event non-signalled? In some cases the program logic will cause the thread to block because of this.If using Windows 8 this may...
7 Sep 2011 by NipunG
I am new to IOCP and struggling with this for last few weeks. I have pasted some core part of my code below related to IOCP.This may not be executed perfectly as I clipped some part to make it easy to understand. I am struggling while receiving the data.As it comes to wsarecv in worket thread,...
30 Sep 2011 by YandyZM
Supose i have a network server and some clients writes data to other clients, just like a chat. If i use and IOCP (IO Completion Port) design and i have 4 threads waiting for messages. When those threads received data i need to serialize the access to the client list to get the socket descriptor...
30 Sep 2011 by Ray Radin
1. Depends on how you use it. The devil is in the details.2. Yes. The client list should be accessed by only one thread. This thread can tell the other 4 threads to resend using IOCP or standard windows message.
1 Oct 2011 by Len Holgate
1 - You could use a single writer multiple reader lock around your client list.2 - You could reference count the client objects, you then only need to hold the lock on the client list for long enough to obtain the client object rather than for the whole send operation.
30 Mar 2012 by purplewill
I've read many articles say that IOCP is used in BeginXX/EndXX pair calls.However, when i test them, my result shown that IOCP didn't work in BeginExecuteReader call, while it worked just fine in BeginGetResponse call.I'm very confused with this outcome.Can anyone tell me the reason?Is...
8 Apr 2012 by Anil_Kumar_India
Hi All,We are developing web application based on ASP.net with MVC3. Our requirement is to compose/present a page dynamically based on a configuration saved by Administrator. We need to load multiple components (in our case partial views) dynamically for a module/screen. as per...
26 Jul 2013 by Gareth Jensen
Hey there,I'm having some troubles with IOCP and receiving packets. First, here's the basics of what I do in my server socket class to accept connections:CreateIoCompletionPort for the server socket, then initialize worker threads. WSACreateEvent(), then WSAEventSelect using the server...
24 Jun 2014 by bling
If you have a pool of threads and one thread exits - that's likely a design flaw. The work performed by the thread should not cause the thread exit. Normally it does some work and returns to the pool to wait for more work.If GetQueuedCompletionStatus returns an error - write code to handle...
4 Jul 2017 by Wangweilai1
In Windows Server System For example in select model openssl use "SSL_read" function to matching with "recv" function, but on the IOCP modle How can I use openssl function to matching with the "WSARecv" function ? Because of in my program have lot of "WSA***" function so that the openssl BIO...
4 Jul 2017 by Len Holgate
I wrote an article about this for Windows Developer Magazine back in 2002. You can read it here[^]. The trick is to use a bio pair and to push data through the OpenSSL engine. You can use a similar design for IOCP based solutions. The trick is to handle your IOCP read completions normally and...
8 Oct 2017 by NoviceCoder871987
Calling WSARecv with an address of WSABUF.buf+TotalReceivedBytes will have very weird results. I use this method to overcome buffer copying. TotalReceivedBytes is just a per io variable to hold each user totalbytes received through GetQueuedCompletionStatus then each time i add...
8 Oct 2017 by Jochen Arndt
Please check the error code (again). 0x1015 is not a defined error. Note that you must also change WSABUF.len accordingly when changing WSABUF.buf. But I would not do so. The intention of such buffers is what the name implies: Buffering. If you expect large amounts of data blocks, use small...
18 Jun 2018 by Member 10937201
the issue is from microsoft tech document I/O Completion Ports " Please note that while the packets are queued in FIFO order they may be dequeued in a different order. " What I have tried: I can't understand ,because it also stats that" When an asynchronous I/O operation on one of these file...
4 Jun 2018 by KarstenK
They are different queues and it makes sense that one external or remote input isnt waiting for another. The output is local on the Windows machine so enqueing isnt a problem. But why should one input port wait for another? What if the device has some issue? Waiting is not a solution, but move...
28 Dec 2015 by danah gaz
A lightweight, high performance, easy to use asynchronous stream copy method using IOCP with progress, throughput tracking, and no explicit thread creation.
2 Apr 2013 by Zoltán Zörgő
We are not wizards.Do you really think we can answer it from just a printout? Erroneous device drivers might cause such problems. Investigate!1) Check system logs. 2) If you suspect the nonpage pool, use PoolMon, ResMon and PerfMon to track usage over time.3) Put your system up to date:...
29 Jul 2013 by Gareth Jensen
The problem was that I was missing the initial receive. The initial recv is what gets queued for packet processing in IOCP. After telling the socket to receive data, it worked perfectly. Thanks for the tips, hopefully this helps anyone who gets this far.
29 May 2013 by environment
thanks,The problem has been resolved
9 Jun 2014 by yzqxmu_seventeen
so,if occured that,program can running still,but now,how many thread alive?if has two cpu,generated four threads,now,three?