deal with collect-tcp

This commit is contained in:
David Rose 2003-04-03 01:29:19 +00:00
parent 14133304e7
commit 73cacee551
2 changed files with 7 additions and 0 deletions

View File

@ -451,6 +451,9 @@ client_connect(string hostname, int port) {
<< port << "\n";
return false;
}
// Make sure we're not queuing up multiple TCP sockets--we expect
// immediate writes of our TCP datagrams.
_tcp_connection->set_collect_tcp(false);
_reader.add_connection(_tcp_connection);
_is_connected = true;

View File

@ -50,6 +50,10 @@ connection_opened(const PT(Connection) &,
nout << "Got new connection from " << address << "\n";
// Make sure this connection doesn't queue up TCP packets we write
// to it.
new_connection->set_collect_tcp(false);
PStatReader *reader = new PStatReader(_manager, monitor);
_manager->add_reader(new_connection, reader);
reader->set_tcp_connection(new_connection);