rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWSockType Class Reference
[Essential Networking Module]

A type of socket communications channel. More...

#include <rw/network/RWSockType.h>

Inheritance diagram for RWSockType:
RWInet6Type RWInetType

List of all members.

Public Member Functions

 RWSockType ()
 RWSockType (const RWCString &familyName, int domain, int type=SOCK_STREAM, int protocol=0)
 ~RWSockType ()
RWCString getFamilyName () const
int getFamily () const
int getDomain () const
int getType () const
int getProtocol () const
RWCString id (unsigned level) const
bool operator== (const RWSockType &) const
bool operator!= (const RWSockType &) const

Detailed Description

RWSockType represents a type of socket communications channel. It is made up of a family (or domain), a type, and a protocol. An example of a family is the Internet TCP/IP family AF_INET. A socket type is SOCK_STREAM or SOCK_DGRAM. A protocol could be PF_INET or PF_UNSPEC.


Constructor & Destructor Documentation

RWSockType::RWSockType (  ) 

Builds an invalid socket type. To set it to a valid type, use the assignment operator.

RWSockType::RWSockType ( const RWCString familyName,
int  domain,
int  type = SOCK_STREAM,
int  protocol = 0 
)

Builds a socket communication type descriptor. The domain specifies the type of communications channel. For the Internet domain, it is AF_INET; for the Unix domain, it is AF_UNIX. type specifies the type of channel, usually SOCK_STREAM or SOCK_DGRAM. The RWCString should contain 7-bit US-ASCII data.

RWSockType::~RWSockType (  ) 

Destructor.


Member Function Documentation

int RWSockType::getDomain (  )  const [inline]

Returns the integer identifier of the address domain for the socket type, such as AF_INET for an Internet domain address. getFamily() and getDomain() are synonyms.

int RWSockType::getFamily (  )  const [inline]

Returns the integer identifier of the address domain for the socket type, such as AF_INET for an Internet domain address. getFamily() and getDomain() are synonyms.

RWCString RWSockType::getFamilyName (  )  const [inline]

Returns a string representation of the address domain, such as "inet" for the Internet address domain. The RWCString should contain 7-bit US-ASCII data.

int RWSockType::getProtocol (  )  const [inline]

Gets the protocol family that describes the socket type.

int RWSockType::getType (  )  const [inline]

Gets the socket type that describes the socket protocol.

RWCString RWSockType::id ( unsigned  level  )  const

Returns a string describing self. The verbosity of the output is controlled by level where level=0 is the most basic, and level=9 is the most verbose. The RWCString will contain 7-bit US-ASCII data.

bool RWSockType::operator!= ( const RWSockType  )  const

Returns true if any of the components (name, family, type, protocol) differ between the two classes.

bool RWSockType::operator== ( const RWSockType  )  const

Returns true if all of the components (name, family, type, protocol) in the two classes are equivalent.

 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.