Network Basics: TCP/IP
Python's networking modules primarily support TCP/IP
- TCP - A reliable connection-oriented protocol (streams).
- UDP - An unreliable packet-oriented protocol (datagrams).
- Of these, TCP is the most common (HTTP, FTP, SMTP, etc...).
Both protocols are supported using "sockets"
- A socket is a file-like object.
- Allows data to be sent and received across the network like a file.
- But it also includes functions to accept and establish connections.
- Before two machines can establish a connection, both must create a socket object.
|