From 6f6b93da02019141812b81bfdbb6bcda430c3b4d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 26 Jul 2006 22:19:42 +0000 Subject: [Hiper-related work] Added a function called curl_multi_assign() that will set a private pointer added to the internal libcurl hash table for the particular socket passed in to this function. --- include/curl/multi.h | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/curl/multi.h b/include/curl/multi.h index 4fc70640a..eb62446df 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -261,11 +261,14 @@ CURL_EXTERN const char *curl_multi_strerror(CURLMcode); typedef int (*curl_socket_callback)(CURL *easy, /* easy handle */ curl_socket_t s, /* socket */ int what, /* see above */ - void *userp); /* "private" pointer */ + void *userp, /* private callback + pointer */ + void *socketp); /* private socket + pointer */ -CURLMcode curl_multi_socket(CURLM *multi_handle, curl_socket_t s); +CURL_EXTERN CURLMcode curl_multi_socket(CURLM *multi_handle, curl_socket_t s); -CURLMcode curl_multi_socket_all(CURLM *multi_handle); +CURL_EXTERN CURLMcode curl_multi_socket_all(CURLM *multi_handle); /* * Name: curl_multi_timeout() @@ -276,7 +279,8 @@ CURLMcode curl_multi_socket_all(CURLM *multi_handle); * * Returns: CURLM error code. */ -CURLMcode curl_multi_timeout(CURLM *multi_handle, long *milliseconds); +CURL_EXTERN CURLMcode curl_multi_timeout(CURLM *multi_handle, + long *milliseconds); #undef CINIT /* re-using the same name as in curl.h */ @@ -309,8 +313,21 @@ typedef enum { * * Returns: CURLM error code. */ -CURLMcode curl_multi_setopt(CURLM *multi_handle, - CURLMoption option, ...); +CURL_EXTERN CURLMcode curl_multi_setopt(CURLM *multi_handle, + CURLMoption option, ...); + + +/* + * Name: curl_multi_assign() + * + * Desc: This function sets an association in the multi handle between the + * given socket and a private pointer of the application. This is + * (only) useful for curl_multi_socket uses. + * + * Returns: CURLM error code. + */ +CURL_EXTERN CURLMcode curl_multi_assign(CURLM *multi_handle, + curl_socket_t sockfd, void *sockp); #ifdef __cplusplus } /* end of extern "C" */ -- cgit v1.2.3