Frage

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?

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top