APIs and the Application Layer

An Application Programming Interface (API) is a predefined collection of functions that a program can use to access other parts of the operating environment. Programs use API functions to communicate with the operating system. A network protocol stack is a classic application of the API concept. As shown in Figure 7.4, a network API provides an interface from the application to the protocol stack. The application program uses functions from the API to open and close connections and write or read data to the network.

Figure 7.4. A network API enables an application to access the network through TCP/IP.

The Sockets ...

Get Sams Teach Yourself TCP/IP in 24 Hours, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.