quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

ares_set_socket_configure_callback.3 (1321B)


      1 .\"
      2 .\" Copyright (C) Daniel Stenberg
      3 .\" SPDX-License-Identifier: MIT
      4 .TH ARES_SET_SOCKET_CONFIGURE_CALLBACK 3 "6 Feb 2016"
      5 .SH NAME
      6 ares_set_socket_configure_callback \- Set a socket configuration callback
      7 .SH SYNOPSIS
      8 .nf
      9 #include <ares.h>
     10 
     11 typedef int (*ares_sock_config_callback)(ares_socket_t \fIsocket_fd\fP,
     12                                          int \fItype\fP,
     13                                          void *\fIuserdata\fP)
     14 
     15 void ares_set_socket_configure_callback(ares_channel_t *\fIchannel\fP,
     16                                         ares_sock_config_callback \fIcallback\fP,
     17                                         void *\fIuserdata\fP)
     18 .fi
     19 .SH DESCRIPTION
     20 .PP
     21 This function sets a \fIcallback\fP in the given ares channel handle. Cannot be
     22 used when \fBARES_OPT_EVENT_THREAD\fP is passed to \fIares_init_options(3)\fP.
     23 
     24 This callback function will be invoked after the socket has been created, but
     25 before it has been connected to the remote server, which is an ideal time
     26 to configure various socket options.  The callback must return ARES_SUCCESS
     27 if things are fine, or return -1 to signal an error. A returned error will
     28 abort the ares operation.
     29 .SH SEE ALSO
     30 .BR ares_init_options (3),
     31 .BR ares_set_socket_callback (3)
     32 .SH AVAILABILITY
     33 ares_set_socket_configure_callback(3) was added in c-ares 1.11.0
     34