Learning Python Networking - Second Edition
by José Manuel Ortega, Dr. M. O. Faruque Sarker, Sam Washington
Code limitations
If we execute these scripts and try to connect to that same server from another Terminal, it will simply reject the connection.
The BUFFER_SIZE variable of the 1024 value is the maximum amount of data that can be received at one time. But this does not mean that the function will return 1024 bytes. The send() function also has this behavior. send() returns the number of bytes sent, which may be less than the size of the data that is sent.
Normally in network programming, to make a server handle multiple connections at the same time, concurrency or parallelism is implemented. The problem with concurrency is that it is complicated to make it work. Of course, if an application needs scalability, it is almost an obligation to ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access