Account
ArmsysApi 0.12.18 |
BSocketAddress Class Reference
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 SockAddr * | raw () 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 () |
BSocketAddress & | operator= (const BSocketAddress &add) |
operator const SockAddr * () const | |
int | operator== (const BSocketAddress &add) const |
int | operator!= (const BSocketAddress &add) const |
Private Attributes | |
int | olen |
SockAddr * | oaddress |
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 *()
| 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()
◆ setIp4() [1/3]
◆ setIp4() [2/3]
◆ setIp4() [3/3]
◆ setPort()
void BSocketAddress::setPort | ( | BUInt16 | port | ) |
Member Data Documentation
◆ oaddress
| private |
◆ olen
| private |
The documentation for this class was generated from the following files:
Generated by 1.8.15