Add ClientPool

Clients are created and kept in the pool at first.
ClientList gets a free client from the pool.

Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
tomoaki
2021-05-25 11:50:58 +09:00
parent 740faeb09f
commit 982e6d4884
4 changed files with 125 additions and 26 deletions

View File

@@ -152,7 +152,8 @@ private:
=====================================*/
typedef enum
{
Cstat_Disconnected = 0,
Cstat_Free = 0,
Cstat_Disconnected,
Cstat_TryConnecting,
Cstat_Connecting,
Cstat_Active,
@@ -176,6 +177,7 @@ class Forwarder;
class Client
{
friend class ClientList;
friend class ClientsPool;
public:
Client(bool secure = false);
Client(uint8_t maxInflightMessages, bool secure);