|
|
|
|
|
by aboardRat4
76 days ago
|
|
>To prevent head-of-line blocking. Of course using TCP has nothing to do with head-of-line blocking. Only if you blindly do write(socket, fileptr, sizeof(file)), it starts to matter, but, you know, people did not start writing for TCP/IP yesterday. If you have a decent protocol, it splits files (and texts as well) into chunks, and sends them in prioritized order, text chunks having higher priority than binary chunks. The server re-assembles the chunks then. The fact that such a simple way of multiplexing data is a discovery for XMPP fanboys is very revealing. |
|
But it's easy to end up with low throughput, because you limit how much unacked bulk data you send, because you don't want to overqueue bulk data and not be able to immediately write interactive messages.
And it's easy to end up with high latency, because despite the limits above, you queued too much and interactive messages need to wait. Or you sent bulk data and there was a burst of packet loss and new data can't be received until the missing packets are resent and received.
> people did not start writing for TCP/IP yesterday.
And yet you find resuming uploads over http to be too hard?