This commit is contained in:
Timur A. Fatkhullin
2024-11-12 01:00:22 +03:00
parent 6acc1f94ba
commit 9769c24005
6 changed files with 48 additions and 15 deletions

View File

@@ -232,6 +232,13 @@ public:
_recvTimeout(ctx.recvTimeout),
_sendTimeout(ctx.sendTimeout)
{
_serverPtr->logInfo("Create client session with ID = {} (addr = {})", _ident, (void*)this);
}
virtual ~Session()
{
_serverPtr->logInfo("Delete client session with ID = {} (addr = {})", _ident, (void*)this);
}
netsession_ident_t ident() const
@@ -241,6 +248,8 @@ public:
void start()
{
_serverPtr->logInfo("Start client session with ID = {} (addr = {})", _ident, (void*)this);
auto self(this->shared_from_this());
_netService.asyncReceive(
@@ -281,6 +290,8 @@ public:
void stop()
{
_serverPtr->logInfo("Stop client session with ID = {} (addr = {})", _ident, (void*)this);
_netService.close();
}