Beej's Guide to Network Programming code.
Layer | |
---|---|
7 | Application |
6 | Presentation |
5 | Session |
4 | Transport |
3 | Network |
2 | Data link |
1 | Physical |
- Stream Sockets: SOCK_STREAM
- Datagram Sockets: SOCK_DGRAM
Note: HTTP uses stream sockets
The sequence of system calls when you're going to be listening for incoming connections:
- getaddrinfo();
- socket();
- bind();
- listen();
- accept();
1 - Beej's Guide to Network Programming
2 - OSI model