diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2002-01-16 14:53:19 +0000 | 
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2002-01-16 14:53:19 +0000 | 
| commit | 8d97792dbc08251edc1aac339d0ca593b98327be (patch) | |
| tree | ced3da62433631dafef5d38ec225a462c53922e8 | |
| parent | 8d07c87be7ff63a071098c720f67800d31837d82 (diff) | |
- shrunk the BUFSIZE define from 50K to 20K
- made a separate buffer for uploads (due to the non-blocking stuff)
- added two connectdata struct fields for non-blocking uploads
| -rw-r--r-- | lib/urldata.h | 17 | 
1 files changed, 14 insertions, 3 deletions
| diff --git a/lib/urldata.h b/lib/urldata.h index 727fd5b18..d655347f4 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -83,7 +83,7 @@  #include "http_chunks.h" /* for the structs and enum stuff */  /* Download buffer size, keep it fairly big for speed reasons */ -#define BUFSIZE (1024*50) +#define BUFSIZE (1024*20)  /* Defaul upload buffer size, keep it smallish to get faster progress meter     updates. This is just default, it is dynamic and adjusts to the upload @@ -251,6 +251,7 @@ struct Curl_transfer_keeper {    struct SessionHandle *data;    struct connectdata *conn;    char *buf; +  char *uploadbuf;    int maxfd;    /* the file descriptors to play with */ @@ -409,6 +410,16 @@ struct connectdata {    /* This struct is inited when needed */    struct Curl_transfer_keeper keep; + +  /* 'upload_present' is used to keep a byte counter of how much data there is +     still left in the buffer, aimed for upload. */ +  int upload_present; + +   /* 'upload_fromhere' is used as a read-pointer when we uploaded parts of a +      buffer, so the next read should read from where this pointer points to, +      and the 'upload_present' contains the number of bytes available at this +      position */ +  char *upload_fromhere;                                     };  /* @@ -495,8 +506,8 @@ struct UrlState {    char *headerbuff; /* allocated buffer to store headers in */    int headersize;   /* size of the allocation */ -  char buffer[BUFSIZE+1]; /* buffer with size BUFSIZE */ - +  char buffer[BUFSIZE+1]; /* download buffer */ +  char uploadbuffer[BUFSIZE+1]; /* upload buffer */    double current_speed;  /* the ProgressShow() funcion sets this */    bool this_is_a_follow; /* this is a followed Location: request */ | 
