سؤال

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