aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/pingpong.c4
-rw-r--r--lib/pingpong.h10
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/pingpong.c b/lib/pingpong.c
index 4b10e845e..69834da7d 100644
--- a/lib/pingpong.c
+++ b/lib/pingpong.c
@@ -503,6 +503,10 @@ CURLcode Curl_pp_disconnect(struct pingpong *pp)
return CURLE_OK;
}
+bool Curl_pp_moredata(struct pingpong *pp)
+{
+ return (!pp->sendleft && pp->cache && pp->nread_resp < pp->cache_size);
+}
#endif
diff --git a/lib/pingpong.h b/lib/pingpong.h
index d65671b32..3a87e4041 100644
--- a/lib/pingpong.h
+++ b/lib/pingpong.h
@@ -130,4 +130,14 @@ CURLcode Curl_pp_disconnect(struct pingpong *pp);
int Curl_pp_getsock(struct pingpong *pp, curl_socket_t *socks,
int numsocks);
+
+/***********************************************************************
+ *
+ * Curl_pp_moredata()
+ *
+ * Returns whether there are still more data in the cache and so a call
+ * to Curl_pp_readresp() will not block.
+ */
+bool Curl_pp_moredata(struct pingpong *pp);
+
#endif /* HEADER_CURL_PINGPONG_H */