cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: LIBCURL couldn't start connections for some of EASY handle

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 24 Apr 2008 14:35:58 +0200 (CEST)

On Thu, 24 Apr 2008, yifei.chen wrote:

> I use LIBCURL ( 7.18.0 ) in my project recently. // socket callback

> static int mySocketFunc(CURL *e, curl_socket_t s, int what, void *cbp, void
> *sockp)
> {
> netio_context_t *pNetIOContext = (netio_context_t*)cbp;
> struct epoll_event ev;
> memset(&ev, 0, sizeof(struct epoll_event));
> if (what == CURL_POLL_REMOVE) {
> epoll_ctl(pNetIOContext->epfd, EPOLL_CTL_DEL, s, &ev);
> } else {
> ev.data.fd = s;
> ev.events = EPOLLIN | EPOLLPRI;

I don't follow the logic here. Why would you want those events only no matter
what libcurl specicies in the 'what' argument?

> curl_easy_setopt(pHandle, CURLOPT_FORBID_REUSE, 1);
> curl_easy_setopt(pHandle, CURLOPT_FRESH_CONNECT, 1);

Really?

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2008-04-24