I have 3rd party library that uses non-blocking send, recv (in Windows), so I can use libevent (or libev) with select backend to event loop. Is there easy way to use IOCP backend (libevent2, libuv)? Because in different manuals write, that i must use WSASend, WSARecv functions with some additional arguments (pointer to OVERLAPPED structure). How can I use IOCP backend event loop with this 3rd party library without rewriting its code? Or it is not impossible?

有帮助吗?

解决方案

It's not possible.

At the very least:

  • you need to associate the socket that's used with the IOCP that you want to process the completions
  • you need to create the socket with different flags.

Either of these likely requires that you change the library code.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top