Module tox::toxcore::timeout [] [src]

Managing requests IDs and timeouts.

Peers are to be timed out when they do not show any activity before running into a timeout.

Timeout data to store:

By what storage needs to be accessed:

How it is supposed to work

Storage for timeouts

Dependant behaviour

Timeout future

Possibly create a new TimoutFuture for each known node – future is created to trigger GetNodes requests.

Structs

NodeTimeout

A DHT node's associated timeout info.

TimeoutQueue

Store & manage timeout data.

Enums

NodeState

Enum stating whether we consider responsiveness of given DHT node as Good, Bad or Unresponsive.

Constants

BAD_TIME

Number of seconds after which DHT node is considered to be Bad. See NodeState.

PING_TIMEOUT

Number of seconds to reach ping timeout. DHT node has to respond to a PingReq in less than PING_TIMEOUT seconds.

RESPONSE_CHECK

Number of seconds between each time that a DHT node needs to be checked for responsiveness by sending to it a GetNodes request.

UNRESPONSIVE_TIME

Number of seconds after which DHT node is considered to be Unresponsive. See NodeState.