mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
deal with collect-tcp
This commit is contained in:
parent
14133304e7
commit
73cacee551
@ -451,6 +451,9 @@ client_connect(string hostname, int port) {
|
|||||||
<< port << "\n";
|
<< port << "\n";
|
||||||
return false;
|
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);
|
_reader.add_connection(_tcp_connection);
|
||||||
_is_connected = true;
|
_is_connected = true;
|
||||||
|
@ -50,6 +50,10 @@ connection_opened(const PT(Connection) &,
|
|||||||
|
|
||||||
nout << "Got new connection from " << address << "\n";
|
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);
|
PStatReader *reader = new PStatReader(_manager, monitor);
|
||||||
_manager->add_reader(new_connection, reader);
|
_manager->add_reader(new_connection, reader);
|
||||||
reader->set_tcp_connection(new_connection);
|
reader->set_tcp_connection(new_connection);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user