© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
P. JoyceC and Python Applications https://doi.org/10.1007/978-1-4842-7774-4_6

6. Sockets

Philip Joyce1  
(1)
Crewe, UK
 

The socket system allows two or more programs to communicate with each other over the Internet. Messages can be sent between the programs in both directions, if required. Files can be transmitted, and we can have one socket communicating with several others at the same time (this is called “multithreading”).

A Closer Look at Sockets

The term for two sockets communicating using predefined sequences is called “handshaking.” These predefined sequences are called “protocols.” Both server and client have to adhere to the same protocols; otherwise, ...

Get C and Python Applications: Embedding Python Code in C Programs, SQL Methods, and Python Sockets now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.