*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: socket | Section: 2 | Source: MINIX | File: socket.2
SOCKET(2) System Calls Manual SOCKET(2) NAME socket - creates a socket. SYNOPSIS #include <sys/socket.h> int socket(int domain, int type, int protocol); DESCRIPTION socket() creates a socket in the specified domain. A socket is a commu- nications endpoint. Currently two values are supported for domain, PF_INET for internet sockets and PF_UNIX for local unix domain sockets. The type of socket can be SOCK_STREAM for TCP sockets in the PF_INET domain or SOCK_DGRAM for UDP sockets in the PF_INET domain. For sockets in the PF_UNIX domain, SOCK_STREAM, SOCK_DGRAM, and SOCK_SEQPACKET are supported values for type. The value of protocol is always 0 or IP- PROTO_TCP for TCP sockets or IPPROTO_UDP for UDP sockets. RETURN VALUES On success, this function returns a numeric socket descriptor. On er- ror, -1 is returned and errno is set. ERRORS [EAFNOSUPPORT] The domain is not supported. [EPROTOTYPE] The protocol is not supported by the domain. [EMFILE] The process descriptor table is full. [ENFILE] The system descriptor table is full. [ENOSPC] Could not allocate a file descriptor. SEE ALSO socketpair(2), bind(2), listen(2), accept(2), connect(2), shutdown(2), getsockopt(2), setsockopt(2), unix(8) SOCKET(2)

Navigation Options