Module: Essential Networking Module Package: Networking
Does not inherit
#include <rw/network/RWInetPort.h>
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.
bool operator==(const RWInetPort& rhs) const;
Returns true if the two port objects are equal.
bool operator!=(const RWInetPort& rhs) const;
Returns true if the two port objects are not equal.
RWTValVector<RWCString> getAliases() const;
Returns the list of aliases for this service name. The RWCString should contain 7-bit US-ASCII data.
RWCString getName() const;
Returns the official service name for this port. The RWCString should contain 7-bit US-ASCII data.
int getPort() const;
Returns the port number for this port.
RWCString id(unsigned level=0) const;
Returns a string describing self. The verbosity of the output is controlled by level where level=0 is the most basic output, and level=9 is the most verbose. The RWCString should contain 7-bit US-ASCII data.
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() because 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.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.