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?
Asked
Active
Viewed 309 times
0

Vikas
- 8,790
- 4
- 38
- 48

KnowNothing
- 121
- 1
- 11
-
I assumed you meant `boost::asio`. If not disregard my answer. Otherwise tag your question with `boost-asio`. – Vikas Oct 31 '12 at 04:07
-
If you want to learn about IOCP-programming, I would advise you to lean about IOCP as a technology *first*. There are *plenty* of basic IOCP samples on the web that don't involve substantial depth that boost takes it. The boost source can be a quite daunting as a starting point for *anything* if you're unfamiliar with the technology underneath it. – WhozCraig Oct 31 '12 at 04:29
1 Answers
0
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:

Vikas
- 8,790
- 4
- 38
- 48
-
yeah i got it.i think there must be some calls to function "CreateIoCompletionPort" but i didnt find that string in all of files.am i asking a stupid question ? – KnowNothing Oct 31 '12 at 05:16
-
@KnowNothing, looks like i missed the impl file in my list. Take a look at: detail/impl/win_iocp_io_service.ipp – Vikas Oct 31 '12 at 05:20