Change interfaces name and make it compatible.

This commit is contained in:
Xie Han
2025-09-19 18:24:54 +08:00
parent 0f1bbcee05
commit 00c0da0e82
2 changed files with 23 additions and 6 deletions
+15 -4
View File
@@ -61,26 +61,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 set_ssl_ctx(SSL_CTX *ctx)
{
+8 -2
View File
@@ -109,14 +109,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);
}
@@ -135,6 +135,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'. */