Where can I get the codes about iocp in source code of asio?
-
22-07-2021 - |
سؤال
I wanted to learn how to use iocp perfectly, but I couldn't find the function CreateIoCompletionPort
.
I explored all the files of asio, and only found few .cpp
files!
How can/should I explore the source code?
المحلول
Asio is highly templated library and all of the code lives in header files. You can find them here. The iocp related stuff that talks to underline OS can be found inside the detail folder.
To start you can take a look at implementation of deadline timer.
- deadline_timer.hpp, typedefs:
- basic_deadline_timer.hpp, uses the service:
- deadline_timer_service.hpp, is implemented in:
- detail/deadline_timer_service.hpp, uses:
- detail/timer_scheduler.hpp, typedefs:
- detail/timer_scheduler_fwd.hpp, uses:
- detail/win_iocp_io_service.hpp, includes,
- detail/impl/win_iocp_io_service.ipp, where the actual implementation is.
- detail/win_iocp_io_service.hpp, includes,
- detail/timer_scheduler_fwd.hpp, uses:
- detail/timer_scheduler.hpp, typedefs:
- detail/deadline_timer_service.hpp, uses:
- deadline_timer_service.hpp, is implemented in:
- basic_deadline_timer.hpp, uses the service:
لا تنتمي إلى StackOverflow