RWInetAddrRWInetPort
Networking Tools: Network Communication Classes (net library)
#include <rw/toolpro/inetaddr.h> RWInetPort port("discard");
net, tls (and possibly std)
Encapsulates an internet port and its service names. You can construct an RWInetPort from either an explicit port number or a symbolic service name.
RWInetPort(int port=0); RWInetPort(const RWCString& service); RWInetPort(const char *);
Builds a port from the port number itself, or from a string representing the name of the port.
RWInetPort(const RWInetPort& x);
Creates a copy of x.
RWTValVector<RWCString> aliases() const;
Returns the list of aliases for this service name.
RWCString id(unsigned level=0);
Returns a string describing self. The verbosity of the output is controlled by level with level=0 being the most basic output and level=9 the most verbose.
RWCString name() const;
Returns the official service name for this port.
int port() const;
Returns the port number for this port.
void prepare() const;
Ensures that no future operations block. This function calls the service database routines to learn all that can be learned about this port name. It is not necessary to explicitly call prepare() since it is called by other member functions if needed.
ostream& operator<<(ostream& strm, const RWInetPort& x);
Outputs a representation of x on strm. The representation is generated using the member function x.id() with level=0.
Note: This class does not have an extraction (>>) operator.
RWInetPort& operator=(const RWInetPost& x);
Makes self a copy of x. The previous contents of self are lost.
©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.