mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
examples/externalsocket.c: s/closesocket/closecb
... since closesocket is a function in WinSock.
Reported-by: Marcel Raad
Bug: 55fcb84859 (co)
mmitcomment-22347818
This commit is contained in:
parent
45cecfbd33
commit
c5de7f50f7
@ -58,7 +58,7 @@ static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
|
|||||||
return written;
|
return written;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int closesocket(void *clientp, curl_socket_t item)
|
static int closecb(void *clientp, curl_socket_t item)
|
||||||
{
|
{
|
||||||
(void)clientp;
|
(void)clientp;
|
||||||
printf("libcurl wants to close %d now\n", (int)item);
|
printf("libcurl wants to close %d now\n", (int)item);
|
||||||
@ -145,7 +145,7 @@ int main(void)
|
|||||||
curl_easy_setopt(curl, CURLOPT_OPENSOCKETDATA, &sockfd);
|
curl_easy_setopt(curl, CURLOPT_OPENSOCKETDATA, &sockfd);
|
||||||
|
|
||||||
/* call this function to close sockets */
|
/* call this function to close sockets */
|
||||||
curl_easy_setopt(curl, CURLOPT_CLOSESOCKETFUNCTION, closesocket);
|
curl_easy_setopt(curl, CURLOPT_CLOSESOCKETFUNCTION, closecb);
|
||||||
curl_easy_setopt(curl, CURLOPT_CLOSESOCKETDATA, &sockfd);
|
curl_easy_setopt(curl, CURLOPT_CLOSESOCKETDATA, &sockfd);
|
||||||
|
|
||||||
/* call this function to set options for the socket */
|
/* call this function to set options for the socket */
|
||||||
|
Loading…
Reference in New Issue
Block a user