mirror of
https://github.com/sogou/workflow.git
synced 2026-10-17 04:31:07 +08:00
Add CommMessageIn::renew().
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user