Socket programming

Every device connected to the internet uses sockets to communicate with another device or server. The basic idea is quite simple; a client that usually has some requests connects to a server that is able to handle those kind of requests, and the communication between those two is established using sockets. Nowadays, there are many frameworks out there with which you can easily set up a communication channel, but to understand this scenario as much as we can, we will go through socket programming, and I will explain everything. To sum up, the client requests some data from the server and the server responds with an answer back to the client.

The following is a simple image representing this communication scenario:

Socket programming is actually the two arrows in the preceding image. It shows how the communication is implemented and how a client can identify the server and send some data to finally get a response.

We will use Python as our programming language. If you are not familiar with it, take some time and take an online course, since it is crucial to understand some basics of programming. Python is a simple language with many available frameworks. However, we will analyze the real programming that happens under the framework. This way, you will be able to expand this project, learn more, have an overall idea of what we are doing, and debug your problems.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.171.12