Berkeley sockets (also known as the BSD socket API) originated with the 4.2BSD system (released in 1983) as an API, covered under the BSD license, for development of sockets. Only in 1989, however, could UC Berkeley release versions of its operating system and networking library free from the licensing constraints of the Open Group's copyright-protected UNIX operating system.
The Berkeley socket API forms the de facto standard abstraction for network sockets. Most other programing languages use a similar interface as the C API.
Table of contents |
2 The client side 3 The server side 4 Blocking vs. NonBlocking |
header files
. They include:
Definitions for the most basic of socket structures with the BSD socket API
Basic data types associated with structures within the BSD socket API
Definitions for the socketaddr_in{} and other base data structures.
Definitions and data type declarations for SOCK_UNIX streams
accept()
to satisfy a connection request from a remote host. A specified socket on the local host (which must have the capability of accepting the connection) connects to the requesting socket on the remote host. The code returns the remote socket's socket address.