delivers this information or times out. The communications mechanism between
the manager APIs and agents uses the User Datagram Protocol (UDP). Therefore,
both systems need to support UDP.
Sockets APIs
Sockets provides an API for applications that require program-to-program commu-
nications. This interface is based on and compatible with Berkeley Software Distri-
butions 4.3. Using sockets, server and client processes can be on the same
system or on different systems.
The types of sockets follow:
Stream sockets, which are connection oriented
Datagrams, which are connectionless
Raw sockets, which provide direct access to low-layer protocols
Sequenced-packet sockets, which are connection oriented
Figure 8-1 shows a typical application flow when the sockets APIs are used.
SERVER CLIENT
┌──────────────────┐ ┌──────────────────┐
socket() socket()
└────────┬─────────┘ └────────┬─────────┘
66
┌──────────────────┐ ┌──────────────────┐
bind() bind()
└────────┬─────────┘ └──────���─┬─────────┘
6
┌──────────────────┐
listen()
└────────┬─────────┘
6
┌──────────────────┐
connect()
└────────┬─────────┘
6
┌──────────────────┐
accept()
└────────┬─────────┘
66
┌──────────────────┐ ┌──────────────────┐
send ├───────────5│ receive
receive │ %──────────┤ send
└────────┬─────────┘ └────────┬─────────┘
66
┌──────────────────┐ ┌──────────────────┐
close() close()
└──────────────────┘ └──────────────────┘
Figure 8-1. Simplified Sequence of Events for a Sockets Program Example
For more information about sockets, see the

Sockets Programming

book,
SC41-5422.
8-26 System API Programming V4R1