Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

20.2 Basic Concepts

To help us understand the examples, let's first review some fundamental concepts of the int library.

20.2.1 Protocol Clients

A protocol client is a C++ class that provides complete control of a specific Internet protocol. It uses object-oriented concepts and C++ language features to make the protocol easier to use. For example, in the int library, the FTP client class RWIFtpClient encapsulates FTP protocol commands. Figure 22 illustrates the protocol client concept.

Figure 22 -- The protocol client concept

20.2.2 Protocol Agents

A protocol agent provides a higher level of abstraction for performing protocol transactions. It is built from its respective protocol client, and therefore handles more details of a protocol for you than the protocol client. For instance, the FTP agent class, RWIFtpAgent, provides an easy-to-use layer that performs common FTP protocol requests. Figure 23 illustrates the protocol agent concept.

Figure 23 -- The protocol agent concept

20.2.3 Protocol Replies

Each Internet protocol request results in a reply from the server to which the request was sent. The protocol reply classes in the int library encapsulate protocol replies. The int library provides a reply class and derived classes for each Internet protocol. These derived classes provide additional information that is specific to the types of protocol replies. For example, RWIFtpReply and its derived classes RWIFtpPwdReply and RWIFtpDataReply contain an encapsulation of the standard FTP protocol reply messages.

20.2.4 IOUs

The int library uses the Threads.h++ IOU abstraction for asynchronous communications. An IOU is produced when an asynchronous operation is launched. The IOU is available immediately after it is created; if it has not yet produced a result, any attempt to redeem the IOU blocks until a result is available.

All of the int library's agent and client methods return RWIOUResults.


Previous fileTop of DocumentContentsIndexNext file

©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.