There are 2 main periods in a networking call:
- check if the data ready in kernel space
- copy data from kernel space to user space (the system function: revcfrom)
Linux provides 5 network programming I/O models
- Blocking I/O
- Non-Blocking I/O
- I/O multiplexing (select, poll and epoll)
- Signal Driven I/O
- Asynchronous I/O (aio_* functions)
1. Blocking I/O
2. Non-Blocking I/O
3. I/O multiplexing (select, poll and epoll)
4. Signal Driven I/O
5. Asynchronous I/O (aio_* functions)
6. Compare above 5 models
documents:
networkprogrammingmodels.ods