Essential Networking Module User’s Guide
PART I Overview of the Essential Networking Module
Introduction
Welcome
Examples
Products and Services Information
Basic Concepts
Product Definition
Operation
A Simple Code Example
A Comparative Code Example
Key Abstractions
About Portals
RWSocketPortal
RWPortal as a Base
About Sockets
RWSocket
RWSocketListener
Relationship to Other Modules
Essential Networking and SourcePro Net
Essential Networking and the SourcePro Product Line
Product Organization
Classes
Header Files
Architecture
Foundation
Communication Adapters Layer
Portal Layer
Communication Services Layer
Class Hierarchies
PART II The Networking Package
Portals
Using Portals to Write Client Programs
Writing a Simple Client
Handling Errors
Reading From a Portal
Understanding the Portal and Implementation Classes
Using Channel-specific Portal Classes
Streams
Using Iostreams
Using Iostream Classes for Formatted Output
Using Iostream Classes for Formatted Input
Understanding the Architecture of a Portal Stream
Understanding Virtual Streams
Using Virtual Streams
Constructing a Portable ASCII Virtual Stream for Output
Constructing a Binary Virtual Stream for Input from a Portal
Creating Chains of Objects
Socket Addresses
Introduction
The Socket Address Classes
Understanding the Base Class
Controlling Network Access
Printing Socket Addresses
Using Generic Socket Addresses
Constructing Generic Addresses
Understanding How RWSockAddr Is Implemented
Using Internet Addresses
Constructing a Host
Building Internet Addresses
Using IPv6 Addresses
Constructing a Host
Building IPv6 Addresses
Using Socket Types
Understanding Socket Types
Representing a Socket Type
The Berkeley Sockets Adapter
Introduction
Using RWSocket
Closing Sockets and Avoiding Resource Leaks
Using Socket Portals
Using Communication Services with Sockets
Socket Multiplexing
Working with Socket Attributes
Using rwSocketSelect
Examples
The Windows Socket Adapter
Introduction
Initializing and Cleaning Up
Using the Networking Package in Global Objects
Socket Security
Servers
Introduction
A Simple Synchronous Server
Socket Listeners
Complex Servers
Appendix A, Glossary
Internet Protocols Module User’s Guide
PART I Overview of the Internet Protocols Module
Introduction
Welcome
Packages in the Internet Protocols Module
Examples
Products and Services Information
Product Overview
Introduction
Definitions
Architecture
Reference-counting and the Handle-Body Implementation
Protocol Command Sequence
Multithreading and IOUs
RWTIOUResult
RWTIOUResult Callbacks
RWTIOUResult Polling
A Common Multithreading Mistake
PART II Packages of the Internet Protocols Module
The Internet Basics Package
Introduction
Classes in the Internet Basics Package
Header Files
Internet Basics Class Hierarchy
About RWDirEntry
About Protocol Replies
About RWStreamCoupler
About RWURL
The FTP Package
Introduction
Classes in the FTP Package
Header Files
FTP Class Hierarchy
About FTP Protocol Replies
Using Active and Passive Clients
Sending Generic Protocol Commands
File Retrieval: Using the FTP Agent (Part I)
File Retrieval: Using the FTP Agent (Part II)
FTP Command Demo: Using the FTP Client
The HTTP Package
Introduction
Classes in the HTTP Package
Header Files
HTTP Class Hierarchies
Using the HTTP Classes
Connecting to the Server
Creating a Request
Sending a Request
Retrieving a Reply
Interpreting the Reply
Bringing it All Together
Advanced Topics
Additional HTTP Methods
Specifying a Custom Message-Body Handler
Downloading Part of a Document
Adding and Removing Headers
Adding a Maximum Wait to Requests
Sending Requests through HTTP Proxies
Persistent Connections and Pipelined Requests
HTTP and International Documents
The POP3 Package
Introduction
Classes in the POP3 Package
Header Files
POP3 Class Hierarchy
About Protocol Replies
Saving a Mail Message to a File
Checking for the End of a Mail Message
Mail Retrieval: Using the POP3 Client
The SMTP Package
Introduction
Classes in the SMTP Package
Header Files
SMTP Class Hierarchy
About Protocol Replies
Closing the Mail Transfer Session
Mail Sender: Using the SMTP Agent
The MIME Package
Introduction
Classes in the MIME Package
Header Files
Relationship to Transport Protocols
Approach to Validating Messages
MIME Class Hierarchy
MIME Basics
Part and Message
Part Structure
MIME Headers
Part Body
The MIME Package Representation of a Message
Using the MIME Package
Preparing Data
Create an RWCString
Convert Text to Canonical Form
Encode the Data
Creating a Simple MIME Part
Create Headers for the Part
Create an RWMimePart
Add the Headers to the Part
Add the String to the Part
Create a MIME String
Program: Creating a Simple MIME Message
Creating a Multipart MIME Part
Create Parts
Create Headers for a Multipart
Create an RWMimeMultipart
Add Each Part
Add Headers to the Part
Create a MIME String
Program: Creating a Multipart MIME Message
Processing a MIME Part
Receive the Part as a String
Create a MIME Part
Fill the MIME Part From the String
Retrieve the Headers as Necessary
Process the Body
Simple MIME Parts
Multipart MIME Parts
Program: Processing a Simple MIME Message
Program: Processing a Multipart MIME Message
Advanced Example
MIME Package Advanced Topics
Using the MIME Headers Effectively
The MIME-Version Header
The Content-Type Header
The Content-Transfer-Encoding Header
The Content-ID Header
The Content-Description Header
The Content-Location Header
The Content-Disposition Header
Part Body
Constructing MIME Part Bodies
Canonical Form
Multipart Bodies
Transfer Encodings
Identity Encodings
Base 64 Encoding
Quoted-Printable Encoding
MIME and Internationalized Messages
Secure Communication Module User’s Guide
PART I Overview of the Secure Communication Module
Introduction
What Is the Secure Communication Module?
Packages in the Secure Communication Module
Module-Specific Software Requirements
Cryptographic Library Dependency
Installing the Packages
Assumptions
Examples
Products and Services Information
Product Overview
Understanding Secure Communication
The Secure Sockets Package
The HTTPS Package
Concepts
PART II Secure Sockets Package
Overview of the Secure Sockets Package
Introduction
Classes in the Secure Sockets Package
Header Files
Secure Sockets Package Class Hierarchy
Using Secure Sockets
Getting Started with Secure Sockets
Writing a Client Program That Uses RWSecureSocket
Writing a Client Program That Uses RWSecureSocketPortal
Writing a Server Program That Uses RWSecureSocket
Writing a Server Program That Uses RWSecureSocketPortal
About the Keys and Certificates in the Example Programs
Developing Secure Applications
Writing New Secure Sockets Applications
Porting Existing Networking Package Applications to the Secure Sockets Package
Obtaining Certificates
Obtaining Trusted Certificates to Verify Other Certificates
Obtaining Certificates to Identify a Specific Entity
Using Hard-Coded Keys and Certificates
Initializing the Secure Sockets Package
Seeding the Random Number Generator
Global Objects and the Secure Sockets Package Initialization
Creating the Secure Socket Context
Initializing the Context to Perform Server Authentication Only
Initializing the Context to Perform Both Client and Server Authentication
Constructing a Certificate
Checking the Validity of a Certificate
Using RWSecureSocket, RWSecureSocketPortal, and RWSecureSocketListener
Advanced Topics
Using RWPortalIStream and RWPortalOstream
Using RWAsymmetricKey
Using Encrypted Keys
Handling Exceptions
Using the Secure Sockets Callbacks
Password Callback
Certificate Verification Callback
Handshake Information Callback
Client Certificate Callback
Reusing Sessions
Implementing Both Client and Server Authentication
Client Example
Server Example
Mixing Calls to the Secure Sockets Package with Calls to the Cryptographic Library
Handling Errors from the Cryptographic Library
Secure Socket Multiplexing
Working with Secure Socket Attributes
Using RWSecureSocketAttribute
Using rwSecureSocketSelect
Multithreading, the Handle-Body Idiom, and the Secure Sockets Package
Security Issues
PART III HTTPS Package
Overview of the HTTPS Package
Introduction
Classes in the HTTPS package
Header Files
HTTPS Package Class Hierarchy
Using HTTPS
Getting Started with HTTPS
Using RWHttpAgent to Retrieve a Document Securely
Using RWHttpsSecureSocketClient to Retrieve a Document
Developing HTTPS Applications
Connecting Through a Proxy
Using the Security Callbacks
Certificate Name Check Callback
Certificate Name Mismatch Callback
Callbacks
Supplying Your Own Callbacks
Writing a Callback
Switching to the Default Callback
Using the HTTP CONNECT Method with the HTTPS Package
PART IV FTPS Package
Overview of the FTPS Package
Introduction
Classes in the FTPS Package
Header Files
FTPS Package Class Hierarchy
Using FTPS
Developing an FTPS Application
About FTPS Protocol Replies
Using the FTPS Package
PART V Resources
Appendix A, RWSocket & RWSecureSocket
Functions That Do Not Appear in the Secure Sockets Package
Functions That Are Deprecated
Appendix B, Bibliography
References
Essential Networking Module User’s Guide
Appendix B, Bibliography