curl-library
Re: new multi interface functions, continued
Date: Thu, 10 Mar 2005 01:39:07 +0000
Daniel Stenberg wrote:
> typedef int (*curl_socket_callback)(CURL *easy, /* easy handle */
> curl_socket_t s, /* socket */
> int what, /* see above */
> void *userp); /* "private" pointer */
The callback is passed the CURL* easy handle. (Why?)
> NOTE: with this prototype, libcurl will need an internal hash table to map
> socket numbers to internal easy handles.
> CURLMcode curl_multi_socket(CURLM *multi_handle
> curl_socket_t s,
> int what);
Given that you've passed the CURL* easy handle to the application's event
callback, why not have the event loop call curl_multi_socket() with
the easy handle instead of the file descriptor?
Then you wouldn't need a hash table.
-- Jamie
Received on 2005-03-10