network_study_level_edge_triggered

step:

  1. make

  2. open a terminal: ./server

  3. then open another terminal: ./client

  4. and write abcdefg in client terminal

  5. you will see some output in the server terminal.

switch comment in add_event to see the difference in level triggered and edge triggered.

I have refered: https://blog.csdn.net/hyman_c/article/details/53944949

The code is in the source of 后台开发:核心技术与应用实践 p278

Thank you, enjoy it!