IBM Version 4 Universal Remote User Manual


 
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()
└────────┬─────────┘ └────────┬─────────┘
┌──────────────────┐ ┌──────────────────┐
bind() bind()
└────────┬─────────┘ └────────┬─────────┘
┌──────────────────┐
listen()
└────────┬─────────┘
┌──────────────────┐
connect()
└────────┬─────────┘
┌──────────────────┐
accept()
└────────┬─────────┘
┌──────────────────┐ ┌──────────────────┐
send ├───────────│ receive
receive │ ──────────┤ send
└────────┬─────────┘ └────────┬─────────┘
┌──────────────────┐ ┌──────────────────┐
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