The purpose of this paper is to collate the problems in the process of network programming in order to deepen their understanding and also for readers ' reference.
Reference book: "UNIX Network Programming"
The following aspects are introduced:
- Basic knowledge of network programming (TCP/IP protocol)
- Example of a TCP client/server (Echo Service)
- Efficient network programming: blocking/non-blocking, synchronous/asynchronous, Io multiplexing (Select/poll/epoll learning, cross-platform encapsulated library Libev)
- Echo Service for non-blocking +io multiplexing
- Master/worker programming model in Network development: NGINX/UWSGI (Discussion of the next surprise group problem)
- Echo Service for multi-process + non-blocking +io multiplexing
- Use Python to write an HTTP (https) Proxy: Pyproxy
- Summarize
- Appendix Common Tools and FAQs:
- Tcpdump/wireshark/strace use
- Client/Server Exception conditions
- Client normal disconnect (send Fin pack)
- Client exception crash (send fin packet)
- The client suddenly breaks the net (no fin packets are sent, no longer responds)
- Server terminated normally (send Fin pack)
- Server exception crash (send fin packet)
- Server exception restart after crash
- The server suddenly breaks the net (not sending fin packets, no longer responds)
- Connection aborted before accept return
Network programming Pan-Talk