Each running process has a file descriptor table which
contains pointers to all open i/o streams.  When a
process starts, three entries are created in the first
three cells of the table.  Entry 0 points to standard
input, entry 1 points to standard output, and entry 2
points to standard error.  Whenever a file or other i/o
stream is opened, a new entry is created in this table,
usually in the first available empty slot.

The socket system call returns an entry into this
table; i.e.  a small integer.  This value is used for
other calls which use this socket.  The accept system
call returns another entry into this table.  The value
returned by accept is used for reading and writing to
that connection.

