explain_accept_or_die(3) Library Functions Manual explain_accept_or_die(3)NAME
explain_accept_or_die - accept a connection on a socket and report errors
SYNOPSIS
#include <libexplain/accept.h>
int explain_accept_or_die(int fildes, struct sockaddr *sock_addr, socklen_t *sock_addr_size);
DESCRIPTION
The explain_accept_or_die function is used to call the accept(2) system call. On failure an explanation will be printed to stderr,
obtained from explain_accept(3), and then the process terminates by calling exit(EXIT_FAILURE).
This function is intended to be used in a fashion similar to the following example:
int fd = explain_accept_or_die(fildes, sock_addr, sock_addr_size);
fildes The fildes, exactly as to be passed to the accept(2) system call.
sock_addr
The sock_addr, exactly as to be passed to the accept(2) system call.
sock_addr_size
The sock_addr_size, exactly as to be passed to the accept(2) system call.
Returns:
This function only returns on success, see accept(2) for more information. On failure, prints an explanation and exits.
SEE ALSO accept(2)
accept a connection on a socket
explain_accept(3)
explain accept(2) errors
exit(2) terminate the calling process
COPYRIGHT
libexplain version 0.52
Copyright (C) 2008 Peter Miller
explain_accept_or_die(3)
Check Out this Related Man Page
explain_bind_or_die(3) Library Functions Manual explain_bind_or_die(3)NAME
explain_bind_or_die - bind a name to a socket and report errors
SYNOPSIS
#include <libexplain/bind.h>
void explain_bind_or_die(int fildes, const struct sockaddr *sock_addr, int sock_addr_size);
DESCRIPTION
The explain_bind_or_die function is used to call the bind(2) system call. On failure an explanation will be printed to stderr, obtained
from explain_bind(3), and then the process terminates by calling exit(EXIT_FAILURE).
This function is intended to be used in a fashion similar to the following example:
explain_bind_or_die(fildes, sock_addr, sock_addr_size);
fildes The fildes, exactly as to be passed to the bind(2) system call.
sock_addr
The sock_addr, exactly as to be passed to the bind(2) system call.
sock_addr_size
The sock_addr_size, exactly as to be passed to the bind(2) system call.
Returns:
This function only returns on success. On failure, prints an explanation and exits.
SEE ALSO bind(2) bind a name to a socket
explain_bind(3)
explain bind(2) errors
exit(2) terminate the calling process
COPYRIGHT
libexplain version 0.52
Copyright (C) 2008 Peter Miller
explain_bind_or_die(3)
Hi,
I have small problem.
In my (concurrent)server programm,
I am handling accept problem from client like this.
sample of server code.
/*******************/
end = 0;
while (! end )
{
sockfd = accept(...)
if(sockfd == -1)
{
if (errno == EINTR) /* this is bcoz... (5 Replies)
I have 3 file, each of has got 80000 records.
file1.txt
-----------------------
ABC001;active;modify;accept;
ABC002;notactive;modify;accept;
ABC003;notactive;no-modify;accept;
ABC004;active;modify;accept;
ABC005;active;no-modify;accept;
file2.txt
---------------------------... (8 Replies)
does anyone can help me with this homework, please..I am beginner in linux and I don't how to do it :(
Create a script scanner.sh which will accept two arguments: the first argument is the DNS name or the IP address of a system, or a network address or an IP range, the second argument is... (1 Reply)
Hi there,
I'm trying to create a script that will accept multiple inputs by copying and pasting the strings from a notepad, hit Enter key and output the string to a text file.I'm thinking of using the read command however it will just simply get the first line.
Apologies but got no idea how... (7 Replies)