The POSIX_SOCKETS feature API is summarized in the following table. Some of the calls listed are also included in other features:
|
Function |
Description |
|---|---|
|
accept() |
Accept a connection on a socket |
|
bind() |
Bind a name to a socket |
|
close() |
Close a file descriptor |
|
connect() |
Initiate a connection on a socket |
|
dup() |
Duplicate an open file descriptor |
|
dup2() |
Duplicate an open file descriptor |
|
fcntl() |
File control |
|
getpeername() |
Get name of connected peer |
|
getsockname() |
Get socket name |
|
setsockopt() |
Set options on sockets |
|
getsockopt() |
Get options on sockets |
|
ioctl() |
Device control |
|
listen() |
Listen for connections on a socket |
|
read() |
Read from a socket |
|
recv() |
Receive a message from a socket |
|
recvfrom() |
Receive a message from a socket |
|
recvmsg() |
Receive a message from a socket |
|
select() |
Synchronous I/O multiplexing |
|
send() |
Send a message from a socket |
|
sendto() |
Send a message from a socket. |
|
sendmsg() |
Send a message from a socket |
|
shutdown() |
Shut down part of a full-duplex connection |
|
socket() |
Create an endpoint for communication |
|
socketpair() |
Create a pair of connected sockets |
|
write() |
Write on a socket |