socket man page on Minix

Man page or keyword search:  
man Server   6208 pages
apropos Keyword Search (all sections)
Output format
Minix logo
[printable version]

SOCKET(2)							     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
       IPPROTO_TCP for TCP sockets or IPPROTO_UDP for UDP sockets.

RETURN VALUES
       On success, this function returns  a  numeric  socket  descriptor.   On
       error, -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), ip(4), inet(8), unix(8)

								     SOCKET(2)
[top]

List of man pages available for Minix

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net