diff options
author | Daniel Stenberg <daniel@haxx.se> | 2001-01-25 12:23:57 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2001-01-25 12:23:57 +0000 |
commit | 30eab8ca515b36985346953cf7988144ccdfb8f9 (patch) | |
tree | ff57ea66290be94a04f11910795a49ea301b35d1 | |
parent | e49a82b06ca9ba4de72e991f4759bed50d57fb38 (diff) | |
download | gnurl-30eab8ca515b36985346953cf7988144ccdfb8f9.tar.gz gnurl-30eab8ca515b36985346953cf7988144ccdfb8f9.tar.bz2 gnurl-30eab8ca515b36985346953cf7988144ccdfb8f9.zip |
moved curl_read() and curl_write() to sendf.c
-rw-r--r-- | lib/url.c | 61 |
1 files changed, 0 insertions, 61 deletions
@@ -546,67 +546,6 @@ RETSIGTYPE alarmfunc(int signal) } #endif -CURLcode curl_write(CURLconnect *c_conn, char *buf, size_t amount, - size_t *n) -{ - struct connectdata *conn = (struct connectdata *)c_conn; - struct UrlData *data; - size_t bytes_written; - - if(!n || !conn || (conn->handle != STRUCT_CONNECT)) - return CURLE_FAILED_INIT; - data = conn->data; - -#ifdef USE_SSLEAY - if (data->ssl.use) { - bytes_written = SSL_write(data->ssl.handle, buf, amount); - } - else { -#endif -#ifdef KRB4 - if(conn->sec_complete) - bytes_written = sec_write(conn, conn->writesockfd, buf, amount); - else -#endif - bytes_written = swrite(conn->writesockfd, buf, amount); -#ifdef USE_SSLEAY - } -#endif /* USE_SSLEAY */ - - *n = bytes_written; - return CURLE_OK; -} - -CURLcode curl_read(CURLconnect *c_conn, char *buf, size_t buffersize, - size_t *n) -{ - struct connectdata *conn = (struct connectdata *)c_conn; - struct UrlData *data; - size_t nread; - - if(!n || !conn || (conn->handle != STRUCT_CONNECT)) - return CURLE_FAILED_INIT; - data = conn->data; - -#ifdef USE_SSLEAY - if (data->ssl.use) { - nread = SSL_read (data->ssl.handle, buf, buffersize); - } - else { -#endif -#ifdef KRB4 - if(conn->sec_complete) - nread = sec_read(conn, conn->sockfd, buf, buffersize); - else -#endif - nread = sread (conn->sockfd, buf, buffersize); -#ifdef USE_SSLEAY - } -#endif /* USE_SSLEAY */ - *n = nread; - return CURLE_OK; -} - CURLcode curl_disconnect(CURLconnect *c_connect) { struct connectdata *conn = c_connect; |