Move all the connect() logic from TCPSocketHandler into a subclass
This way, TCPSocketHandler only deal with the message sending/receiving, not the connect() or anything else. This will be used for implementing servers (because when a client is accepted, we don’t need all the connect() and dns resolution stuff).
This commit is contained in:
@@ -40,6 +40,11 @@ bool DNSSocketHandler::is_connected() const
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DNSSocketHandler::is_connecting() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void DNSSocketHandler::remove_from_poller()
|
||||
{
|
||||
if (this->poller->is_managing_socket(this->socket))
|
||||
|
||||
Reference in New Issue
Block a user