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:
@@ -24,6 +24,7 @@ public:
|
||||
virtual void on_send() = 0;
|
||||
virtual void connect() = 0;
|
||||
virtual bool is_connected() const = 0;
|
||||
virtual bool is_connecting() const = 0;
|
||||
|
||||
socket_t get_socket() const
|
||||
{ return this->socket; }
|
||||
|
||||
Reference in New Issue
Block a user