Today we present to readers the following lecture of the course “Network Programming in UNIX”, which was read by SkyDNS and Aydeko company at the Ural Federal University (UFU). Unfortunately, there was a forced break in the publications. We hope that the waiting time for the new lecture you used to implement the server and client, which were described by our experts. The lecture, which we decided to publish the fourth, is devoted to a common mistake in online programs. Its essence is quite simple: the situation when the recv () function returns less bytes than it was requested is not processed. During the lesson, students were asked to write a wrapper function for correct handling of such a situation. As a result, the function appears successfully on the board.
We suggest that readers check this wrapper function themselves by writing an astrological client that sends a request one letter per second. To help also documentation on the function sleep (). ')
We want to note that, unlike previous published lectures, there are no slides in the recording. Instead, an ordinary board is used - everything that the students say appears on it. “The lesson turned out to be interactive - I wrote down every line of code that students dictated. Thanks to this, the students turned out to be more involved and better learned the material, ”said Alexander Patrakov . “Such is the stone in the garden of modern technologies.”