1explain_connect_or_die(3)  Library Functions Manual  explain_connect_or_die(3)
2
3
4

NAME

6       explain_connect_or_die  -  initiate a connection on a socket and report
7       errors
8

SYNOPSIS

10       #include <libexplain/connect.h>
11       void   explain_connect_or_die(int   fildes,   const   struct   sockaddr
12       *serv_addr, int serv_addr_size);
13

DESCRIPTION

15       The explain_connect_or_die function is used to call the connect(2) sys‐
16       tem call.  On  failure  an  explanation  will  be  printed  to  stderr,
17       obtained  from  explain_connect(3),  and then the process terminates by
18       calling exit(EXIT_FAILURE).
19
20       This function is intended to be used in a fashion similar to  the  fol‐
21       lowing example:
22              explain_connect_or_die(fildes, serv_addr, serv_addr_size);
23
24       fildes  The  fildes,  exactly  as to be passed to the connect(2) system
25               call.
26
27       serv_addr
28               The serv_addr, exactly as to be passed to the connect(2) system
29               call.
30
31       serv_addr_size
32               The  serv_addr_size,  exactly as to be passed to the connect(2)
33               system call.
34
35       Returns:
36               This function only returns on success.  On failure,  prints  an
37               explanation and exits.
38

SEE ALSO

40       connect(2)
41               initiate a connection on a socket
42
43       explain_connect(3)
44               explain connect(2) errors
45
46       exit(2) terminate the calling process
47
49       libexplain version 0.40
50       Copyright (C) 2008 Peter Miller
51
52
53
54                                                     explain_connect_or_die(3)
Impressum