/* read! */
result = Curl_read(conn, conn->sockfd, k->buf,
- BUFSIZE -1, &nread);
+ data->set.buffer_size?
+ data->set.buffer_size:BUFSIZE -1,
+ &nread);
if(0>result)
break; /* get out of loop */
*/
data->set.telnet_options = va_arg(param, struct curl_slist *);
break;
+
+ case CURLOPT_BUFFERSIZE:
+ /*
+ * The application kindly asks for a differently sized receive buffer.
+ * If it seems reasonable, we'll use it.
+ */
+ data->set.buffer_size = va_arg(param, long);
+
+ if(data->set.buffer_size> (BUFSIZE -1 ))
+ data->set.buffer_size = 0; /* huge internal default */
+
+ break;
+
default:
/* unknown tag and its companion, just ignore: */
return CURLE_FAILED_INIT; /* correct this */
struct ssl_config_data ssl; /* user defined SSL stuff */
int dns_cache_timeout; /* DNS cache timeout */
+ long buffer_size; /* size of receive buffer to use */
/* Here follows boolean settings that define how to behave during
this session. They are STATIC, set by libcurl users or at least initially