transport: set TCP_NODELAY

Reduces latency.
This commit is contained in:
Avi Kivity
2015-08-18 15:01:20 +03:00
parent 2e92759943
commit 2b4eaf83ab

View File

@@ -228,6 +228,7 @@ cql_server::listen(ipv4_addr addr) {
void
cql_server::do_accepts(int which) {
_listeners[which].accept().then([this, which] (connected_socket fd, socket_address addr) mutable {
fd.set_nodelay(true);
auto conn = make_shared<connection>(*this, std::move(fd), addr);
++_connects;
++_connections;