README revision 40161064
1Engineering a Reactor
2 -- how to write a non-blocking network library from scratch.
3
4Step 0: a do-nothing event loop
5  EventLoop, assertInLoopThread()
6  test1: poll for 10 seconds, creates two threads, each one has an EventLoop
7  test2: abort() as it accesses event loop created in a different thread
8
9Step 1: prototype of reactor
10  Channel, Poller, updateChannel().
11  test1: poll for ever, creates two threads, each one has an EventLoop
12  test2: same as before
13  test3: poll a timerfd, which expires in 5 seconds
14
15Step 2: TimerQueue
16  TimerQueue, Timer, TimerId, EventLoop::runAfter, EventLoop::runEvery
17  not thread safe
18  test4: timer queue unittest
19
20Step 3: wakeup(), runInLoop(), EventLoopThread
21  test5: runInLoop(), runAfter() in loop thread
22  test6: runInLoop(), runAfter() in a different thread
23
24Step 4: Acceptor
25  test7: listen on port 9981, accept, send, and close
26
27Step 5: TcpServer, create TcpConnection
28  test8: use of TcpServer, discard server
29
30Step 6: TcpConnection passive close
31
32Step 7: TcpConnection read with Buffer, add receiveTime to read callback
33  test3: show receiveTime
34  test8: show receiveTime
35
36Step 8: TcpConnection write
37  test9: echo server
38  test10: data source server
39
40Step 9: write complete callback, tcp no delay, SIGPIPE
41  test11: chargen server
42
43Step 10: multithreaded TcpServer, EventLoopThreadPool
44  test8,9,10,11: support multithreads
45
46Step 11: Connector
47  test12:
48
49Step 12: TcpClient
50  test13:
51
52Step 13: epoll, EPoller
53
54Step 14: TimerQueue::cancel()
55
56