RELEASE-NOTES: two more bug fixes
[platform/upstream/c-ares.git] / ares_set_socket_callback.3
1 .\"
2 .TH ARES_SET_SOCKET_CALLBACK 3 "20 Nov 2009"
3 .SH NAME
4 ares_set_socket_callback \- Set a socket creation callback
5 .SH SYNOPSIS
6 .nf
7 .B #include <ares.h>
8 .PP
9 .B void ares_set_socket_callback(ares_channel \fIchannel\fP,
10                              ares_sock_create_callback \fIcallback\fP,
11                              void *\fIuserdata\fP)
12 .PP
13 .B cc file.c -lcares
14 .fi
15 .SH DESCRIPTION
16 .PP
17 This function sets a \fIcallback\fP in the given ares channel handle. This
18 callback function will be invoked after the socket has been created, and
19 connected to the remote server. The callback must return ARES_SUCCESS if
20 things are fine, or use the standard ares error codes to signal errors
21 back. Returned errors will abort the ares operation.
22 .SH SEE ALSO
23 .BR ares_init_options (3)
24 .SH AVAILABILITY
25 ares_set_socket_callback(3) was added in c-ares 1.6.0
26 .SH AUTHOR
27 Gregor Jasny
28