ArmSys Support
ArmsysApi  0.12.18

Socket Address. More...

#include <BNetwork.h>

Public Types

typedef struct sockaddr SockAddr
 
typedef struct sockaddr_in SockAddrIP
 

Public Member Functions

 BSocketAddress ()
 
 BSocketAddress (const BSocketAddress &add)
 
 BSocketAddress (SockAddr *address, int len)
 
 ~BSocketAddress ()
 
BError set (SockAddr *address, int len)
 
const SockAddrraw () const
 
int len () const
 
BError setIp4 (BString hostName, BUInt16 port)
 
BError setIp4 (BUInt8 a0, BUInt8 a1, BUInt8 a2, BUInt8 a3, BUInt16 port)
 
BError setIp4 (BUInt32 address, BUInt16 port)
 
BUInt32 ip4AddressUInt () const
 Returns socket ip address. More...
 
void setPort (BUInt16 port)
 
BUInt16 port () const
 Returns socket port. More...
 
BString getString () const
 Return string version of address <ip>:<port> More...
 
ip_addr_t getIpAddress ()
 
BSocketAddressoperator= (const BSocketAddress &add)
 
 operator const SockAddr * () const
 
int operator== (const BSocketAddress &add) const
 
int operator!= (const BSocketAddress &add) const
 

Private Attributes

int olen
 
SockAddroaddress
 

Detailed Description

Socket Address.

Member Typedef Documentation

◆ SockAddr

typedef struct sockaddr BSocketAddress::SockAddr

◆ SockAddrIP

typedef struct sockaddr_in BSocketAddress::SockAddrIP

Constructor & Destructor Documentation

◆ BSocketAddress() [1/3]

BSocketAddress::BSocketAddress ( )

◆ BSocketAddress() [2/3]

BSocketAddress::BSocketAddress ( const BSocketAddress add)

◆ BSocketAddress() [3/3]

BSocketAddress::BSocketAddress ( SockAddr address,
int  len 
)

◆ ~BSocketAddress()

BSocketAddress::~BSocketAddress ( )

Member Function Documentation

◆ getIpAddress()

ip_addr_t BSocketAddress::getIpAddress ( )

◆ getString()

BString BSocketAddress::getString ( ) const

Return string version of address <ip>:<port>

◆ ip4AddressUInt()

BUInt32 BSocketAddress::ip4AddressUInt ( ) const

Returns socket ip address.

◆ len()

int BSocketAddress::len ( ) const

◆ operator const SockAddr *()

BSocketAddress::operator const SockAddr * ( ) const
inline

◆ operator!=()

int BSocketAddress::operator!= ( const BSocketAddress add) const

◆ operator=()

BSocketAddress & BSocketAddress::operator= ( const BSocketAddress add)

◆ operator==()

int BSocketAddress::operator== ( const BSocketAddress add) const

◆ port()

BUInt16 BSocketAddress::port ( ) const

Returns socket port.

◆ raw()

const BSocketAddress::SockAddr * BSocketAddress::raw ( ) const

◆ set()

BError BSocketAddress::set ( SockAddr address,
int  len 
)

◆ setIp4() [1/3]

BError BSocketAddress::setIp4 ( BString  hostName,
BUInt16  port 
)

◆ setIp4() [2/3]

BError BSocketAddress::setIp4 ( BUInt8  a0,
BUInt8  a1,
BUInt8  a2,
BUInt8  a3,
BUInt16  port 
)

◆ setIp4() [3/3]

BError BSocketAddress::setIp4 ( BUInt32  address,
BUInt16  port 
)

◆ setPort()

void BSocketAddress::setPort ( BUInt16  port)

Member Data Documentation

◆ oaddress

SockAddr* BSocketAddress::oaddress
private

◆ olen

int BSocketAddress::olen
private

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