![]() |
Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Socket address. More...
#include <roc_address/target_posix/roc_address/socket_addr.h>
Public Types | |
| enum | { MaxStrLen = 196 } |
Public Member Functions | |
| SocketAddr () | |
| Construct empty address. | |
| void | clear () |
| Clear address. | |
| bool | has_host_port () const |
| Check whether host and port are set. | |
| bool | set_host_port (AddrFamily type, const char *host, int port) |
| Set host address. | |
| bool | set_host_port_auto (const char *host, int port) |
| Set host address, auto-detect family. | |
| bool | set_host_port_saddr (const sockaddr *sa) |
| Set address from sockaddr struct. | |
| AddrFamily | family () const |
| Get IP version (IPv4 or IPv6). | |
| bool | multicast () const |
| Check whether this is multicast address. | |
| bool | get_host (char *buf, size_t bufsz) const |
| Get host IP address. | |
| int | port () const |
| Get address port. | |
| sockaddr * | saddr () |
| Get sockaddr struct. | |
| const sockaddr * | saddr () const |
| Get sockaddr struct. | |
| socklen_t | slen () const |
| Get sockaddr struct length. | |
| socklen_t | max_slen () const |
| Get maximum allowed sockaddr struct length. | |
| operator const struct unspecified_bool * () const | |
| Convert to bool. | |
| bool | operator== (const SocketAddr &other) const |
| Compare addresses. | |
| bool | operator!= (const SocketAddr &other) const |
| Compare addresses. | |
Socket address.
Definition at line 26 of file socket_addr.h.
| anonymous enum |
Definition at line 79 of file socket_addr.h.
| roc::address::SocketAddr::SocketAddr | ( | ) |
Construct empty address.
| void roc::address::SocketAddr::clear | ( | ) |
Clear address.
| AddrFamily roc::address::SocketAddr::family | ( | ) | const |
Get IP version (IPv4 or IPv6).
| bool roc::address::SocketAddr::get_host | ( | char * | buf, |
| size_t | bufsz | ||
| ) | const |
Get host IP address.
| bool roc::address::SocketAddr::has_host_port | ( | ) | const |
Check whether host and port are set.
| socklen_t roc::address::SocketAddr::max_slen | ( | ) | const |
Get maximum allowed sockaddr struct length.
| bool roc::address::SocketAddr::multicast | ( | ) | const |
Check whether this is multicast address.
| roc::address::SocketAddr::operator const struct unspecified_bool * | ( | ) | const |
Convert to bool.
| bool roc::address::SocketAddr::operator!= | ( | const SocketAddr & | other | ) | const |
Compare addresses.
| bool roc::address::SocketAddr::operator== | ( | const SocketAddr & | other | ) | const |
Compare addresses.
| int roc::address::SocketAddr::port | ( | ) | const |
Get address port.
| sockaddr * roc::address::SocketAddr::saddr | ( | ) |
Get sockaddr struct.
| const sockaddr * roc::address::SocketAddr::saddr | ( | ) | const |
Get sockaddr struct.
| bool roc::address::SocketAddr::set_host_port | ( | AddrFamily | type, |
| const char * | host, | ||
| int | port | ||
| ) |
Set host address.
| bool roc::address::SocketAddr::set_host_port_auto | ( | const char * | host, |
| int | port | ||
| ) |
Set host address, auto-detect family.
| bool roc::address::SocketAddr::set_host_port_saddr | ( | const sockaddr * | sa | ) |
Set address from sockaddr struct.
| socklen_t roc::address::SocketAddr::slen | ( | ) | const |
Get sockaddr struct length.
| sockaddr_in roc::address::SocketAddr::addr4 |
Definition at line 93 of file socket_addr.h.
| sockaddr_in6 roc::address::SocketAddr::addr6 |
Definition at line 94 of file socket_addr.h.