Merge branch 'master' of https://github.com/sogou/workflow into nossl

This commit is contained in:
Xie Han
2025-09-19 18:31:29 +08:00
2 changed files with 23 additions and 6 deletions

View File

@@ -60,26 +60,37 @@ public:
}
public:
/* Timeout of waiting for the first package of each chunk. If not set,
the max waiting time will be the global 'response_timeout'. */
void set_watch_timeout(int timeout)
{
this->task->set_watch_timeout(timeout);
}
void set_recv_timeout(int timeout)
/* Timeout of receiving a complete chunk. */
void set_receive_timeout(int timeout)
{
this->task->set_receive_timeout(timeout);
}
/* Timeout of sending the HTTP request. */
void set_send_timeout(int timeout)
{
this->task->set_send_timeout(timeout);
}
{
this->task->set_send_timeout(timeout);
}
/* Speicify HTTP keep alive timeout. */
void set_keep_alive(int timeout)
{
this->task->set_keep_alive(timeout);
}
/* Equal to 'set_receive_timeout()'. For compatibility purpose only. */
void set_recv_timeout(int timeout)
{
this->set_receive_timeout(timeout);
}
public:
void extract_on_header(bool on)
{

View File

@@ -108,14 +108,14 @@ public:
the task is started or in 'extract'. */
/* Timeout of waiting for each message. Very useful. If not set,
the max waiting time will be the global 'response_timeout'*/
the max waiting time will be the global 'response_timeout'. */
void set_watch_timeout(int timeout)
{
this->task->set_watch_timeout(timeout);
}
/* Timeout of receiving a complete message. */
void set_recv_timeout(int timeout)
void set_receive_timeout(int timeout)
{
this->task->set_receive_timeout(timeout);
}
@@ -134,6 +134,12 @@ public:
this->task->set_keep_alive(timeout);
}
/* For compatibility purpose only. */
void set_recv_timeout(int timeout)
{
this->set_receive_timeout(timeout);
}
public:
/* Call 'set_extract' or 'set_callback' only before the task
is started, or in 'extract'. */