A flawed example
-
Problems with the GeeksforGeeks
Socket
Programming in C/C++ example
- Only handles one client connection.
- One socket
read
may not equal one socketwrite
- C/C++ requires loops, buffers, and delimiters as in this ancient program
Normalizing the I/O
Use a user-space reliable stream mechanism to extend the unreliable kernel-space socket byte stream.
- accept returns a “new socket object usable to send and receive data on the connection&rdquol
recv
andsend
use Bytes Objectsmakefile
creates text file objects