aboutsummaryrefslogtreecommitdiff
path: root/lib/urldata.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-01-10 10:30:19 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-01-10 10:30:19 +0000
commit18faa509403c39b4914114cfe2966241b62b2959 (patch)
treebb5e0bf7ac66a313e62263348449afbe4ad924c6 /lib/urldata.h
parent0ce484eed901f73cae89e25d9939a249729f15d3 (diff)
Georg Lippitsch brought CURLOPT_SEEKFUNCTION and CURLOPT_SEEKDATA to allow
libcurl to seek in a given input stream. This is particularly important when doing upload resumes when there's already a huge part of the file present remotely. Before, and still if this callback isn't used, libcurl will read and through away the entire file up to the point to where the resuming begins (which of course can be a slow opereration depending on file size, I/O bandwidth and more). This new function will also be preferred to get used instead of the CURLOPT_IOCTLFUNCTION for seeking back in a stream when doing multi-stage HTTP auth with POST/PUT.
Diffstat (limited to 'lib/urldata.h')
-rw-r--r--lib/urldata.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/urldata.h b/lib/urldata.h
index 976bc3771..e918cd61d 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -961,6 +961,9 @@ struct connectdata {
size_t buf_len; /* Length of the buffer?? */
+ curl_seek_callback seek_func; /* function that seeks the input */
+ void *seek_client; /* pointer to pass to the seek() above */
+
/*************** Request - specific items ************/
/* previously this was in the urldata struct */
@@ -1324,6 +1327,7 @@ struct UserDefined {
bool free_referer; /* set TRUE if 'referer' points to a string we
allocated */
void *postfields; /* if POST, set the fields' values here */
+ curl_seek_callback seek_func; /* function that seeks the input */
curl_off_t postfieldsize; /* if POST, this might have a size to use instead
of strlen(), and then the data *may* be binary
(contain zero bytes) */
@@ -1342,6 +1346,7 @@ struct UserDefined {
the address and opening the socket */
void* opensocket_client;
+ void *seek_client; /* pointer to pass to the seek callback */
/* the 3 curl_conv_callback functions below are used on non-ASCII hosts */
/* function to convert from the network encoding: */
curl_conv_callback convfromnetwork;