Andrew MacIntyre <andymac@bullseye.apana.org.au> writes: > - why is the socket.fp being set to unbuffered? I believe it prevents deadlocks. In HTTP/1.1, the server may not close the connection, but may refuse to send more data until it receives the next command. So you must be very careful to not read more data from the socket than the protocol guarantees you to be present. I believe stdio would not apply the necessary care: if it wants to fill the buffer, it will block. It won't see EOF because there is none, but there won't be any more data, because the server won't send any until we send the next command. We won't send the next command, since we are blocked. Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4