Domanda

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?

È stato utile?

Soluzione

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.

  1. deadline_timer.hpp, typedefs:
    1. basic_deadline_timer.hpp, uses the service:
      1. deadline_timer_service.hpp, is implemented in:
        1. detail/deadline_timer_service.hpp, uses:
          1. detail/timer_scheduler.hpp, typedefs:
            1. detail/timer_scheduler_fwd.hpp, uses:
              1. detail/win_iocp_io_service.hpp, includes,
                1. detail/impl/win_iocp_io_service.ipp, where the actual implementation is.
:-)

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top