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: