Major overhaul introducing http pipelining support and shared connection

cache within the multi handle.
This commit is contained in:
Daniel Stenberg 2006-09-07 21:49:20 +00:00
parent 7e4193b538
commit b7eeb6e67f
35 changed files with 2313 additions and 1066 deletions

View file

@ -199,22 +199,22 @@ CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...)
break;
case CURLINFO_LASTSOCKET:
if((data->state.lastconnect != -1) &&
(data->state.connects[data->state.lastconnect] != NULL)) {
*param_longp = data->state.connects[data->state.lastconnect]->
sock[FIRSTSOCKET];
(data->state.connc->connects[data->state.lastconnect] != NULL)) {
struct connectdata *c = data->state.connc->connects
[data->state.lastconnect];
*param_longp = c->sock[FIRSTSOCKET];
/* we have a socket connected, let's determine if the server shut down */
/* determine if ssl */
if(data->state.connects[data->state.lastconnect]->ssl[FIRSTSOCKET].use) {
if(c->ssl[FIRSTSOCKET].use) {
/* use the SSL context */
if (!Curl_ssl_check_cxn(data->state.connects[data->state.lastconnect]))
if (!Curl_ssl_check_cxn(c))
*param_longp = -1; /* FIN received */
}
/* Minix 3.1 doesn't support any flags on recv; just assume socket is OK */
#ifdef MSG_PEEK
else {
/* use the socket */
if(recv((int)data->state.connects[data->state.lastconnect]->
sock[FIRSTSOCKET], (void*)&buf, 1, MSG_PEEK) == 0)
if(recv((int)c->sock[FIRSTSOCKET], (void*)&buf, 1, MSG_PEEK) == 0)
*param_longp = -1; /* FIN received */
}
#endif