diff options
author | Daniel Stenberg <daniel@haxx.se> | 2000-08-24 12:33:16 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2000-08-24 12:33:16 +0000 |
commit | 1b1f143cd65cb86138e3083790d89f959e3ecc87 (patch) | |
tree | 8f1f2128b6176c5f3019620af721747e13abb4d1 /lib/sendf.c | |
parent | 31b8eea0414bfb9188f6beea94ea72b26c33894f (diff) | |
download | curl-1b1f143cd65cb86138e3083790d89f959e3ecc87.tar.gz |
hostname and large file support added
Diffstat (limited to 'lib/sendf.c')
-rw-r--r-- | lib/sendf.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/sendf.c b/lib/sendf.c index 87416775c..e048637be 100644 --- a/lib/sendf.c +++ b/lib/sendf.c @@ -84,7 +84,6 @@ void failf(struct UrlData *data, char *fmt, ...) } /* sendf() sends the formated data to the server */ - int sendf(int fd, struct UrlData *data, char *fmt, ...) { size_t bytes_written; @@ -110,6 +109,25 @@ int sendf(int fd, struct UrlData *data, char *fmt, ...) return(bytes_written); } +/* ssend() sends plain (binary) data to the server */ +size_t ssend(int fd, struct UrlData *data, void *mem, size_t len) +{ + size_t bytes_written; + + if(data->bits.verbose) + fprintf(data->err, "> [binary output]\n"); +#ifndef USE_SSLEAY + bytes_written = swrite(fd, mem, len); +#else + if (data->use_ssl) { + bytes_written = SSL_write(data->ssl, mem, len); + } else { + bytes_written = swrite(fd, mem, len); + } +#endif /* USE_SSLEAY */ + return bytes_written; +} + |