|
Electroneum
|
Tor onion address; internal format not condensed/decoded. More...
#include <tor_address.h>
Public Member Functions | |
| tor_address () noexcept | |
An object with port() == 0 and host_str() == unknown_str(). More... | |
| bool | _load (epee::serialization::portable_storage &src, epee::serialization::section *hparent) |
| Load from epee p2p format, and. More... | |
| bool | store (epee::serialization::portable_storage &dest, epee::serialization::section *hparent) const |
| Store in epee p2p format. More... | |
| tor_address (const tor_address &rhs) noexcept | |
| ~tor_address ()=default | |
| tor_address & | operator= (const tor_address &rhs) noexcept |
| bool | is_unknown () const noexcept |
| bool | equal (const tor_address &rhs) const noexcept |
| bool | less (const tor_address &rhs) const noexcept |
| bool | is_same_host (const tor_address &rhs) const noexcept |
| std::string | str () const |
| const char * | host_str () const noexcept |
| std::uint16_t | port () const noexcept |
| bool | is_blockable () const noexcept |
Static Public Member Functions | |
| static constexpr std::size_t | buffer_size () noexcept |
| static const char * | unknown_str () noexcept |
| static tor_address | unknown () noexcept |
| static expect< tor_address > | make (boost::string_ref address, std::uint16_t default_port=0) |
| static constexpr bool | is_loopback () noexcept |
| static constexpr bool | is_local () noexcept |
| static constexpr epee::net_utils::address_type | get_type_id () noexcept |
| static constexpr epee::net_utils::zone | get_zone () noexcept |
Private Member Functions | |
| tor_address (boost::string_ref host, std::uint16_t port) noexcept | |
Keep in private, host.size() has no runtime check. More... | |
Private Attributes | |
| std::uint16_t | port_ |
| char | host_ [63] |
Tor onion address; internal format not condensed/decoded.
|
privatenoexcept |
Keep in private, host.size() has no runtime check.
|
noexcept |
An object with port() == 0 and host_str() == unknown_str().
|
noexcept |
|
default |
| bool net::tor_address::_load | ( | epee::serialization::portable_storage & | src, |
| epee::serialization::section * | hparent | ||
| ) |
Load from epee p2p format, and.
|
inlinestaticconstexprnoexcept |
|
noexcept |
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlinenoexcept |
x.onion value or unknown_str().
|
inlinenoexcept |
!is_unknown().
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
noexcept |
\TODO v2 and v3 should be comparable - requires base32
|
noexcept |
unknown().
|
noexcept |
|
static |
Parse address in onion v2 or v3 format with (i.e. x.onion:80) with default_port being used iff port is not specified in address.
|
noexcept |
|
inlinenoexcept |
0 if unspecified. | bool net::tor_address::store | ( | epee::serialization::portable_storage & | dest, |
| epee::serialization::section * | hparent | ||
| ) | const |
Store in epee p2p format.
| std::string net::tor_address::str | ( | ) | const |
x.onion or x.onion:z if port() != 0.
|
inlinestaticnoexcept |
tor_address object.
|
staticnoexcept |
<unknown tor host>.
|
private |
|
private |