1ARES_SET_SOCKET_CALLBACK(3)Library Functions ManualARES_SET_SOCKET_CALLBACK(3)
2
3
4
6 ares_set_socket_callback - Set a socket creation callback
7
9 #include <ares.h>
10
11 typedef int (*ares_sock_create_callback)(ares_socket_t socket_fd,
12 int type,
13 void *userdata)
14
15 void ares_set_socket_callback(ares_channel channel,
16 ares_sock_create_callback callback,
17 void *userdata)
18
19 cc file.c -lcares
20
22 This function sets a callback in the given ares channel handle. This
23 callback function will be invoked after the socket has been created,
24 and connected to the remote server. The callback must return ARES_SUC‐
25 CESS if things are fine, or return -1 to signal an error. A returned
26 error will abort the ares operation.
27
29 ares_init_options(3),ares_set_socket_configure_callback(3)
30
32 ares_set_socket_callback(3) was added in c-ares 1.6.0
33
35 Gregor Jasny
36
37
38
39
40 20 Nov 2009 ARES_SET_SOCKET_CALLBACK(3)