Say we have:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
data = s.recv(1024)
what if we receive messages, but the last message is not 1024 bytes. Will we still receive it or will we wait forever? How to receive the last message if it doesn't fill up a buffer or what not?
In Node.js, streams have "flush" behavior, where flush is called internally (not sure when), looks like this: https://github.com/ORESoftware/json-parser/blob/master/src/index.ts