|
OPENDHT_PUBLIC friend std::ostream & | operator<< (std::ostream &s, const Node &h) |
|
Definition at line 47 of file node.h.
◆ Node()
dht::Node::Node |
( |
const InfoHash & |
id, |
|
|
const sockaddr * |
sa, |
|
|
socklen_t |
salen |
|
) |
| |
|
inline |
◆ authError()
void dht::Node::authError |
( |
| ) |
|
|
inline |
Makes notice about an additionnal authentication error with this node. Up to MAX_AUTH_ERRORS errors are accepted in order to let the node recover. Upon this limit, the node expires.
Definition at line 73 of file node.h.
◆ authSuccess()
void dht::Node::authSuccess |
( |
| ) |
|
|
inline |
◆ closeSocket()
void dht::Node::closeSocket |
( |
Tid |
id | ) |
|
Closes a socket so that no further data will be red on that socket.
- Parameters
-
socket | The socket to close. |
◆ exportNode()
◆ getAddr()
const SockAddr & dht::Node::getAddr |
( |
| ) |
const |
|
inline |
◆ getAddrStr()
std::string dht::Node::getAddrStr |
( |
| ) |
const |
|
inline |
◆ getFamily()
sa_family_t dht::Node::getFamily |
( |
| ) |
const |
|
inline |
◆ getId()
◆ getNewTid()
Tid dht::Node::getNewTid |
( |
| ) |
|
|
inline |
Generates a new request id, skipping the invalid id.
- Returns
- the new id.
Definition at line 139 of file node.h.
◆ getReplyTime()
const time_point & dht::Node::getReplyTime |
( |
| ) |
const |
|
inline |
◆ getTime()
const time_point & dht::Node::getTime |
( |
| ) |
const |
|
inline |
◆ isClient()
bool dht::Node::isClient |
( |
| ) |
const |
|
inline |
◆ isExpired()
bool dht::Node::isExpired |
( |
| ) |
const |
|
inline |
◆ isIncoming()
bool dht::Node::isIncoming |
( |
| ) |
|
|
inline |
◆ isOld()
bool dht::Node::isOld |
( |
const time_point & |
now | ) |
const |
|
inline |
◆ isRemovable()
bool dht::Node::isRemovable |
( |
const time_point & |
now | ) |
const |
|
inline |
◆ openSocket()
Tid dht::Node::openSocket |
( |
SocketCb && |
cb | ) |
|
Opens a socket on which a node will be able allowed to write for further additionnal updates following the response to a previous request.
- Parameters
-
node | The node which will be allowed to write on this socket. |
cb | The callback to execute once updates arrive on the socket. |
- Returns
- the socket.
◆ reset()
void dht::Node::reset |
( |
| ) |
|
|
inline |
Resets the state of the node so it's not expired anymore.
Definition at line 132 of file node.h.
◆ setTime()
void dht::Node::setTime |
( |
const time_point & |
t | ) |
|
|
inline |
◆ id
◆ MAX_RESPONSE_TIME
constexpr const std::chrono::seconds dht::Node::MAX_RESPONSE_TIME {1} |
|
staticconstexpr |
◆ NODE_EXPIRE_TIME
constexpr const std::chrono::minutes dht::Node::NODE_EXPIRE_TIME {10} |
|
staticconstexpr |
◆ NODE_GOOD_TIME
constexpr const std::chrono::minutes dht::Node::NODE_GOOD_TIME {120} |
|
staticconstexpr |
The documentation for this struct was generated from the following file:
- /tmp/slackbuilds_libs/opendht-1.7.4/include/opendht/node.h