iocpsocket | Windows IOCP Socket sample this is not my code | Socket library
kandi X-RAY | iocpsocket Summary
kandi X-RAY | iocpsocket Summary
Windows IOCP Socket sample, this is not my code, just to share.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of iocpsocket
iocpsocket Key Features
iocpsocket Examples and Code Snippets
Community Discussions
Trending Discussions on iocpsocket
QUESTION
How do I setup IOCP sockets for multiple listeners (on different ports)? Every example I find online is just a single server - multiple clients example, and I don't understand if I supposed to create multiple IOCPs, or use only one for all listeners somehow?
For example, I've found this example on GitHub, which seems to be a slight modification of some code from Win 7 SDK, and this code creates a single completion port for a single listener socket:
...ANSWER
Answered 2017-Mar-24 at 13:41you need only one completion port for all listeners sockets. and several threads (thread pool) which will be listen on this completion port. also possible not direct yourself create completion port and thread pool, but delegate this task to system (ntdll). this is can be done by using BindIoCompletionCallback
or CreateThreadpoolIo
so we have - single completion port, several working threads listening to this port (usual number of threads == number of processor cores) and multiple files(sockets) associated with this completion port via BindIoCompletionCallback
or CreateThreadpoolIo
or CreateIOCompletionPort
(ugly logic - compare with ZwSetInformationFile(..FileCompletionInformation)
which is internally used)
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install iocpsocket
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page