Handling Network Connections
The whole purpose of a socket's existence is to engage in network connections with other network hosts. Each socket can maintain a single connection using a UDP/IP or TCP/IP transport protocol. Which of the two is used is defined by the sock.protocol property.
Sockets are also capable of working with HTTP. HTTP is not a transport protocol, rather, it is based on TCP. Therefore, when your socket is using TCP, it may be for "plain data transmission" or for HTTP.
In this section:
- TCP Connection Basics
- UDP "Connection" Basics
- Accepting Incoming Connections
- Accepting UDP Broadcasts
- Understanding TCP Reconnects
- Understanding UDP Reconnects and Port Switchover
- Incoming Connections on Multiple Sockets
- Establishing Outgoing Connections
- Sending UDP Broadcasts
- Closing Connections
- Checking Connection Status
- More On the Socket's Asynchronous Nature