{
#ifdef TCP_NODELAY
struct SessionHandle *data= conn->data;
- socklen_t onoff = (socklen_t) data->tcp_nodelay;
+ socklen_t onoff = (socklen_t) data->set.tcp_nodelay;
if(setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, (void *)&onoff,
sizeof(onoff)) < 0)
infof(data, "Could not set TCP_NODELAY: %s\n",
if (sockfd == CURL_SOCKET_BAD)
continue;
- else if(data->tcp_nodelay)
+ else if(data->set.tcp_nodelay)
Curl_setNoDelay(conn, sockfd);
#else
/*
return CURLE_COULDNT_CONNECT; /* big time error */
}
- else if(data->tcp_nodelay)
+ else if(data->set.tcp_nodelay)
Curl_setNoDelay(conn, sockfd);
/* nasty address work before connect can be made */
return CURLE_OK;
}
+/**
+ * Curl_open()
+ *
+ * @param curl is a pointer to a sessionhandle pointer that gets set by this
+ * function.
+ * @return CURLcode
+ */
+
CURLcode Curl_open(struct SessionHandle **curl)
{
/* We don't yet support specifying the URL at this point */
* Enable or disable TCP_NODELAY, which will disable/enable the Nagle
* algorithm
*/
- data->tcp_nodelay = va_arg(param, long);
+ data->set.tcp_nodelay = va_arg(param, long);
break;
default:
return result; /* pass back status */
}
-/*
+/**
* CreateConnection() sets up a new connectdata struct, or re-uses an already
* existing one, and resolves host name.
*
* if this function returns CURLE_OK and *async is set to TRUE, the resolve
* response will be coming asynchronously. If *async is FALSE, the name is
* already resolved.
+ *
+ * @param data The sessionhandle pointer
+ * @param in_connect is set to the next connection data pointer
+ * @param addr is set to the new dns entry for this connection
+ * @param async is set TRUE/FALSE depending on the nature of this lookup
+ * @return CURLcode
+ * @see SetupConnection()
*/
static CURLcode CreateConnection(struct SessionHandle *data,
bool ftp_use_eprt; /* if EPRT is to be attempted or not */
curl_ftpssl ftp_ssl; /* if AUTH TLS is to be attempted etc */
bool no_signal; /* do not use any signal/alarm handler */
+ bool global_dns_cache; /* subject for future removal */
+ bool tcp_nodelay; /* whether to enable TCP_NODELAY or not */
- bool global_dns_cache;
};
/*
#if defined(USE_SSLEAY) && defined(HAVE_OPENSSL_ENGINE_H)
ENGINE* engine;
#endif /* USE_SSLEAY */
-
- /* This tells CreateConnection() whether to enable TCP_NODELAY or not */
- int tcp_nodelay;
};
#define LIBCURL_NAME "libcurl"