3 ms·
That doesn't make much sense. Http being that way was a deliberate decision by its creators. They could as well have designed it so that the request header is p
by iforgotpassword 9y ago
That doesn't make much sense. Http being that way was a deliberate decision by its creators. They could as well have designed it so that the request header is prefixed by its length as a 4 byte value, for example. You definitely still want the stream representation for that and not juggle around with packet fragmentation yourself. You can simply disable nagle for your own protocol if it speeds up things for you. The only thing different in your suggestion is that the length prefix adding and handling should be done by the network api instead of your app, which I don't think is that much of a hassle anyways.