Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

12.1 Iostreams for Input and Output

C++ uses iostreams as the standard mechanism for input and output. Iostreams allow type-safe insertion and extraction of both user-defined and built-in types into and out of communication streams. With the net library's iostreams communication service module, you can use the standard iostreams classes to do input and output, using a portal as the underlying source and sink of bytes.

The net library's iostream classes let you use any of the virtual stream classes in Tools.h++. In effect, you connect a virtual stream to a communication channel, such as a socket. This allows you to easily send and receive C++ objects and primitive types over the communication channel, formatting the data as needed. For example, the XDR and endian streams in Tools.h++ version 7 format data in a host-independent fashion so that data can be sent between hosts with different byte ordering. The design of the net library allows you to take advantage of these and other Tools.h++ virtual streams.


Previous fileTop of DocumentContentsIndexNext file

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