+ // Enable TCP_CORK for maximum throughput. In the rare case that the
+ // stream stops entirely, this will cause a small delay (~200 ms)
+ // before the last part is sent out, but that should be fine.
+ if (setsockopt(sock, SOL_TCP, TCP_CORK, &one, sizeof(one)) == -1) {
+ log_perror("setsockopt(TCP_CORK)");
+ // Can still continue.
+ }
+