client add TCP search

This commit is contained in:
Michael Davidsaver
2021-04-17 08:54:10 -07:00
parent 132ad1ae6f
commit 8363c7fe9a
6 changed files with 107 additions and 2 deletions
+8
View File
@@ -92,6 +92,7 @@ void Connection::sendDestroyRequest(uint32_t sid, uint32_t ioid)
void Connection::bevEvent(short events)
{
ConnBase::bevEvent(events);
// called Connection::cleanup()
if(bev && (events&BEV_EVENT_CONNECTED)) {
log_debug_printf(io, "Connected to %s\n", peerName.c_str());
@@ -118,6 +119,8 @@ void Connection::cleanup()
// (maybe) keep myself alive
std::shared_ptr<Connection> self;
ready = false;
context->connByAddr.erase(peerAddr);
if(bev)
@@ -274,6 +277,11 @@ void Connection::handle_CONNECTION_VALIDATED()
ready = true;
createChannels();
if(nameserver) {
log_info_printf(io, "(re)connected to nameserver %s\n", peerName.c_str());
context->poke(true);
}
}
void Connection::handle_CREATE_CHANNEL()