elks-enhanced
public
Read
Owner: themaster
Branch: master
Commits: 6893
Updated: 2026-04-19 00:15
Git CLI clone URL
git clone https://www.xt-emporium.com/git/elks-enhanced.git
Fullscreen desktop URL
Code
Commits
History
Branches
Bug Reports
Discussions
Compare
Settings
elks-enhanced
/
elkscmd
/
man
/
man2
/
socket.2
File editor
.TH SOCKET 2 .SH NAME socket \- creates a socket. .SH SYNOPSIS .ft B #include <sys/socket.h> .in +5 .ti -5 int socket(int \fIdomain\fP, int \fItype\fP, int \fIprotocol\fP); .br .ft P .SH DESCRIPTION socket() creates a socket in the specified \fIdomain\fP. A socket is a communications endpoint. Currently two values are supported for \fIdomain\fP, PF_INET for internet sockets and PF_UNIX for local unix domain sockets. The \fItype\fP of socket can be SOCK_STREAM for TCP sockets in the PF_INET \fIdomain\fP or SOCK_DGRAM for UDP sockets in the PF_INET \fIdomain\fP. For sockets in the PF_UNIX \fIdomain\fP, SOCK_STREAM, SOCK_DGRAM, and SOCK_SEQPACKET are supported values for \fItype\fP. The value of \fIprotocol\fP is always 0 or IPPROTO_TCP for TCP sockets or IPPROTO_UDP for UDP sockets. .SH RETURN VALUES On success, this function returns a numeric socket descriptor. On error, -1 is returned and \fIerrno\fP is set. .SH ERRORS .TP 15 [EAFNOSUPPORT] The \fIdomain\fP is not supported. .TP 15 [EPROTOTYPE] The \fIprotocol\fP is not supported by the \fIdomain\fP. .TP 15 [EMFILE] The process descriptor table is full. .TP 15 [ENFILE] The system descriptor table is full. .TP 15 [ENOSPC] Could not allocate a file descriptor. .SH SEE ALSO .BR socketpair(2), .BR bind(2), .BR listen(2), .BR accept(2), .BR connect(2), .BR shutdown(2), .BR getsockopt(2), .BR setsockopt(2), .BR ip(4), .BR inet(8), .BR unix(8)
Commit message
This repository is read-only for this account.
Repository snapshot
Current branch
master
Visibility
public
Your access
Read
Remote
Configured
File activity
View file history