rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWInetPort Class Reference
[Essential Networking Module]

Encapsulates an Internet port and its service names. More...

#include <rw/network/RWInetPort.h>

List of all members.

Public Member Functions

 RWInetPort (int port=0)
 RWInetPort (const RWCString &service)
 RWInetPort (const char *)
void prepare () const
int getPort () const
RWCString getName () const
RWTValVector< RWCStringgetAliases () const
RWCString id (unsigned level=0) const
bool operator== (const RWInetPort &rhs) const
bool operator!= (const RWInetPort &rhs) const

Related Functions

(Note that these are not member functions.)



std::ostream & operator<< (std::ostream &strm, const RWInetPort &port)

Detailed Description

Encapsulates an Internet port and its service names. You can construct an RWInetPort from either an explicit port number or a symbolic service name.


Constructor & Destructor Documentation

RWInetPort::RWInetPort ( int  port = 0  ) 

Builds a port from the port number itself or from a string representing the name of the port.

RWInetPort::RWInetPort ( const RWCString service  ) 

Builds a port from the port number itself or from a string representing the name of the port.

RWInetPort::RWInetPort ( const char *   ) 

Builds a port from the port number itself or from a string representing the name of the port.


Member Function Documentation

RWTValVector<RWCString> RWInetPort::getAliases (  )  const

Returns the list of aliases for this service name. The RWCString should contain 7-bit US-ASCII data.

RWCString RWInetPort::getName (  )  const

Returns the official service name for this port. The RWCString should contain 7-bit US-ASCII data.

int RWInetPort::getPort (  )  const

Returns the port number for this port.

RWCString RWInetPort::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.

bool RWInetPort::operator!= ( const RWInetPort rhs  )  const

Returns true if the two port objects are not equal.

bool RWInetPort::operator== ( const RWInetPort rhs  )  const

Returns true if the two port objects are equal.

void RWInetPort::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.


Friends And Related Function Documentation

std::ostream & operator<< ( std::ostream &  strm,
const RWInetPort port 
) [related]

Outputs a representation of port on strm. The representation is generated using the member function port.id() with level=0.

Note:
This class does not have an extraction (>>) operator.
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends

© 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.