Penguin
Blame: socketpair(2)
EditPageHistoryDiffInfoLikePages
Annotated edit history of socketpair(2) version 5, including all changes. View license author blame.
Rev Author # Line
1 perry 1 !!NAME
2 socketpair - create a pair of connected sockets
3 !!SYNOPSIS
2 PerryLorier 4 __#include <sys/types.h>__
5 __#include <sys/socket.h>__
1 perry 6
2 PerryLorier 7 __int socketpair(int__ ''d''__, int__ ''type''__, int__ ''protocol''__, int__ ''sv''__[[2]);__
1 perry 8
9 !!DESCRIPTION
2 PerryLorier 10 The call creates an unnamed pair of connected sockets in the specified domain ''d'', of the specified ''type'', and using the optionally specified ''protocol''. The
11 descriptors used in referencing the new sockets are returned in ''sv''[[0] and ''sv''[[1]. The two sockets are indistinguishable.
3 PerryLorier 12
4 PerryLorier 13 The domain is a protocol family, such as AF_UNIX (see unix(7)), the type is a type of socket, such as SOCK_STREAM, SOCK_SEQPACKET or SOCK_DGRAM.
1 perry 14 !!RETURN VALUE
2 PerryLorier 15 On success, zero is returned. On error, -1 is returned, and ''errno'' is set appropriately.
1 perry 16
17 !!ERRORS
2 PerryLorier 18 ;[EMFILE]: Too many descriptors are in use by this process.
5 PerryLorier 19 ;[ENFILE]: Not enough file descriptors available system wide.
2 PerryLorier 20 ;[EAFNOSUPPORT]: The specified address family is not supported on this machine.
21 ;[EPROTONOSUPPORT]: The specified protocol is not supported on this machine.
22 ;[EOPNOSUPPORT]: The specified protocol does not support creation of socket pairs.
23 ;[EFAULT]: The address ''sv'' does not specify a valid part of the process address space.
5 PerryLorier 24 ;[ENOMEM]: Insufficient memory was available to fulfill the request.
25 ;[ENOBUFS]: Insufficient resources were available in the system to perform the operation.
26 ;[EACCES]: Permission denied (Documented by [POSIX])
27
1 perry 28 !!CONFORMING TO
2 PerryLorier 29 4.4BSD (the __socketpair__ function call appeared in 4.2BSD). Generally portable to/from non-BSD systems supporting clones of the BSD socket layer (including System
1 perry 30 V variants).
31 !!SEE ALSO
32 read(2), write(2), pipe(2)
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.

PHP Warning

lib/blame.php:177: Warning: Invalid argument supplied for foreach() (...repeated 6 times)