libBsdSockets
C++ Wrapper classes to the BSD Socket API
BsdSockets::InetAddressPimpl Class Reference

The private implementation of InetAddress. More...

Inheritance diagram for BsdSockets::InetAddressPimpl:
Collaboration diagram for BsdSockets::InetAddressPimpl:

Public Types

typedef std::shared_ptr< InetAddressPimplPtr
 
- Public Types inherited from BsdSockets::LowLevelAddressType< Impl >
typedef std::shared_ptr< LowLevelAddressTypePtr
 
- Public Types inherited from BsdSockets::LowLevelAddress
typedef std::shared_ptr< LowLevelAddressPtr
 

Public Member Functions

 InetAddressPimpl (const sockaddr_in &theLowLevelAddress, const std::string &theActualAddress)
 
const std::string & getActualAddress () const
 
const unsigned int getPort () const
 
- Public Member Functions inherited from BsdSockets::LowLevelAddressType< Impl >
virtual ~LowLevelAddressType ()
 
 LowLevelAddressType ()
 
 LowLevelAddressType (const Impl &theLowLevelAddress)
 
 LowLevelAddressType (const LowLevelAddressType &rhs)
 
virtual const struct sockaddr & getSockAddr () const
 
virtual struct sockaddr & getSockAddr ()
 
virtual socklen_t getSockAddrLen () const
 
- Public Member Functions inherited from BsdSockets::LowLevelAddress
virtual ~LowLevelAddress ()
 

Additional Inherited Members

- Public Attributes inherited from BsdSockets::LowLevelAddressType< Impl >
Impl lowLevelAddress
 

Detailed Description

The private implementation of InetAddress.

This provides both the LowLevelAddress and the computed details of the Address such as port number and actual address matched.

The actual address may differ from the actual address due to hostname resolution, etc.

Definition at line 75 of file InetAddress.cpp.

Member Typedef Documentation

◆ Ptr

Definition at line 77 of file InetAddress.cpp.

Constructor & Destructor Documentation

◆ InetAddressPimpl()

BsdSockets::InetAddressPimpl::InetAddressPimpl ( const sockaddr_in &  theLowLevelAddress,
const std::string &  theActualAddress 
)
inline

Create with parameters

Parameters
theLowLevelAddressto save a copy of for later use in getSockAddr()
theActualAddressthe already formatted string version of the address in theLowLevelAddress

Definition at line 84 of file InetAddress.cpp.

Member Function Documentation

◆ getActualAddress()

const std::string& BsdSockets::InetAddressPimpl::getActualAddress ( ) const
inline
Returns
the actual address matched

Definition at line 98 of file InetAddress.cpp.

◆ getPort()

const unsigned int BsdSockets::InetAddressPimpl::getPort ( ) const
inline
Returns
the port or 0 for none

Definition at line 103 of file InetAddress.cpp.


The documentation for this class was generated from the following file: