Socket Programming for TCP in Python
Socket Programming for TCP in Python
Sockets and the socket API are used to send messages across a network. They provide a form of interprocess communication (IPC). The network can be logical, a local network to the computer or physically connected to an external network, with its own connection to the other networks. The obvious example is the internet.
Sockets have a long history. Their use originated with ARPANET in 1971 & later become an API in the Berkley Software Distribution (BSD) operating system released in 1983 called Berkely sockets.
The most common type of socket applications is client-server applications where one side acts as the server & waits for the connections from the clients.
TCP Sockets:
We will create a socket object using socket .socket() and specify the socket type as socket.SOCK_STREAM. When we do that the default protocol that used is the transmission control protocol (TCP).
Comments
Post a Comment