networking.hardNETWORKING click a line to flag it1def receive_message(sock, expected_size):
2 buffer = sock.recv(expected_size)
3 return buffer
no lines flagged
#070PracticeHard30 min · 200 XP
Assuming a Single read() Call Returns All Data
A protocol parser drops the tail of large messages because it assumes one read() call fills the entire buffer.
Flagged linesNo lines flagged yet
What's wrong?
Flag a line or write a note to submit.