Constructing Generic Addresses
You can build an RWSockAddr in two ways:
*Use a specification string
The string consists of colon-separated fields that describe the address. The first field gives the address family. The rest of the fields depend on the address family. The following code shows how you can build the address of Rogue Wave’s World Wide Web server.
 
RWSockAddr addr = "inet:www.roguewave.com:80";
*Use the stream extraction operator to read an address from an input stream
 
RWSockAddr addr;
cin >> addr;
Anything in the address that is enclosed in parentheses is ignored. For example, in the following code:
 
RWSockAddr addr = "inet:www.roguewave.com(198.68.9.3):80";
the dotted decimal IP address is ignored. This convention is used so that the output formats for socket addresses can contain auxiliary information in parenthesis and still be suitable as input formats. The parentheses can be nested.