mirror of
https://github.com/sogou/workflow.git
synced 2026-02-08 01:33:17 +08:00
Merge branch 'master' of https://github.com/sogou/workflow into nossl
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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'. */
|
||||
|
||||
Reference in New Issue
Block a user