Advanced Topics
Using RWPortalIStream and RWPortalOstream
RWPortalIStream and RWPortalOstream are Communication Services Layer classes that use the RWPortal interface. RWSecureSocketPortal inherits from RWPortal, so instances of RWSecureSocketPortal can be used anywhere that an RWPortal is required.
Example 6 – Using the Communication Services Layer
RWSecureSocketContext context;
context.prepareToAuthenticate(...); // initalize the context
RWInetAddr addr(...); // initalize an address
RWSecureSocketPortal portal(addr, context); // create the portal
RWPortalOstream strm(portal);
strm << "Hello World!" << endl;