mirror of
https://github.com/curl/curl.git
synced 2026-08-25 12:03:39 +03:00
xfer: manage pause bits
Concentrate the handling of KEEP_RECV_PAUSE and KEEP_SEND_PAUSE into common transfer functions. Setting or clearing these bits requires subsequent actions involving connection events and client reader/writer notifications. Have it in one place. Closes #17650
This commit is contained in:
parent
e60103cbb8
commit
0d70dfb79b
9 changed files with 114 additions and 76 deletions
|
|
@ -137,11 +137,18 @@ CURLcode Curl_xfer_recv(struct Curl_easy *data,
|
|||
CURLcode Curl_xfer_send_close(struct Curl_easy *data);
|
||||
CURLcode Curl_xfer_send_shutdown(struct Curl_easy *data, bool *done);
|
||||
|
||||
/**
|
||||
* Return TRUE iff the transfer is not done, but further progress
|
||||
/* Return TRUE if the transfer is not done, but further progress
|
||||
* is blocked. For example when it is only receiving and its writer
|
||||
* is PAUSED.
|
||||
*/
|
||||
* is PAUSED. */
|
||||
bool Curl_xfer_is_blocked(struct Curl_easy *data);
|
||||
|
||||
/* Query if send/recv for transfer is paused. */
|
||||
bool Curl_xfer_send_is_paused(struct Curl_easy *data);
|
||||
bool Curl_xfer_recv_is_paused(struct Curl_easy *data);
|
||||
|
||||
/* Enable/Disable pausing of send/recv for the transfer. */
|
||||
CURLcode Curl_xfer_pause_send(struct Curl_easy *data, bool enable);
|
||||
CURLcode Curl_xfer_pause_recv(struct Curl_easy *data, bool enable);
|
||||
|
||||
|
||||
#endif /* HEADER_CURL_TRANSFER_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue