Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

explain_socket_or_die(3) [debian man page]

explain_socket_or_die(3)				     Library Functions Manual					  explain_socket_or_die(3)

NAME
explain_socket_or_die - create an endpoint and report errors SYNOPSIS
#include <libexplain/socket.h> void explain_socket_or_die(int domain, int type, int protocol); DESCRIPTION
The explain_socket_or_die function is used to call the socket(2) system call. On failure an explanation will be printed to stderr, obtained from explain_socket(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_socket_or_die(domain, type, protocol); domain The domain, exactly as to be passed to the socket(2) system call. type The type, exactly as to be passed to the socket(2) system call. protocol The protocol, exactly as to be passed to the socket(2) system call. Returns: This function only returns on success. On failure, prints an explanation and exits. SEE ALSO
socket(2) create an endpoint for communication explain_socket(3) explain socket(2) errors exit(2) terminate the calling process COPYRIGHT
libexplain version 0.52 Copyright (C) 2008 Peter Miller explain_socket_or_die(3)

Check Out this Related Man Page

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)
Man Page

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

socket

hi everybody ! i want create server/clients in c++ anyone can give me i little exemple for send a string ? or give me a good site for explain. thx (1 Reply)
Discussion started by: mercutio
1 Replies

2. Programming

read system call

When i read 4 bytes from a socket the read function returns 0 value. what does it mean? How should i know whether a message is available in the socket or not? (1 Reply)
Discussion started by: Madhu Babu
1 Replies

3. IP Networking

socket programming

my system is a stand alone system... i want to try doing socket porgramming..ihave heard that this is usually done during testing... how can i do that....? (6 Replies)
Discussion started by: damn_bkb
6 Replies

4. UNIX for Advanced & Expert Users

problem with socket reading

I am not able to receive the message on socket in the current process when its waiting for its child to exit. code looks something like below //in one thread of the current process //thread 1 =============================================== int numBytes = read(sockid,buf,SIZE); //Now the... (2 Replies)
Discussion started by: swap007
2 Replies

5. Programming

basic socket programming

Hello experts, four machines need to communicate with each other. How can I start the socket programming. Can you please explain me more elaborated way. Thank you for your time and effort in advance (4 Replies)
Discussion started by: radhakuna
4 Replies

6. Debian

Help socket prog

HI Can anyone provide me with codes for file transfer server to client or vice versa? Also please explain how to compile those programs in ubuntu terminal as i am totally new to socket programming. Thanks (0 Replies)
Discussion started by: mayhemtrigger
0 Replies