Add CommMessageIn::renew().

This commit is contained in:
Xie Han
2025-09-17 22:19:31 +08:00
parent 9a1e00a25e
commit 2cfc09ead4
2 changed files with 11 additions and 0 deletions
+7
View File
@@ -180,6 +180,13 @@ static int __ssl_connect(SSL_CTX *ssl_ctx, CommConnEntry *entry)
return -1;
}
void CommMessageIn::renew()
{
CommSession *session = this->entry->session;
session->timeout = -1;
session->begin_time = -1;
}
int CommTarget::init(const struct sockaddr *addr, socklen_t addrlen,
int connect_timeout, int response_timeout)
{
+4
View File
@@ -118,6 +118,9 @@ protected:
/* Send small packet while receiving. Call only in append(). */
virtual int feedback(const void *buf, size_t size);
/* In append(), reset the begin time of receiving to current time. */
virtual void renew();
private:
struct CommConnEntry *entry;
@@ -164,6 +167,7 @@ private:
public:
CommSession() { this->passive = 0; }
virtual ~CommSession();
friend class CommMessageIn;
friend class Communicator;
};