There is a wealth of printed and online resources on TCP/IP and the sockets API:
The key book on network programming with the sockets API is [Stevens at al., 2004]. [Snader, 2000] adds some useful guidelines on sockets programming.
[Stevens, 1994] and [Wright & Stevens, 1995] describe TCP/IP in detail. [Comer, 2000], [Comer & Stevens, 1999], [Comer & Stevens, 2000], [Kozierok, 2005], and [Goralksi, 2009] also provide good coverage of the same material.
[Tanenbaum, 2002] provides general background on computer networks.
[Herbert, 2004] describes the details of the Linux 2.6 TCP/IP stack.
The GNU C library manual (online at http://www.gnu.org/) has an extensive discussion of the sockets API.
The IBM Redbook, TCP/IP Tutorial and Technical Overview, provides lengthy coverage of networking concepts, TCP/IP internals, the sockets API, and a host of related topics. It is freely downloadable from http://www.redbooks.ibm.com/.
[Gont, 2008] and [Gont, 2009b] provide security assessments of IPv4 and TCP.
The Usenet newsgroup comp.protocols.tcp-ip is dedicated to questions related to the TCP/IP networking protocols.
[Sarolahti & Kuznetsov, 2002] describes congestion control and other details of the Linux TCP implementation.
Linux-specific information can be found in the following manual pages: socket(7), ip(7), raw(7), tcp(7), udp(7), and packet(7).
See also the RFC list in Section 58.7.