libktorrent  2.2.0
Public Member Functions | List of all members
dht::DBItem Class Reference

#include <database.h>

Public Member Functions

 DBItem (const DBItem &item)
 
 DBItem (const net::Address &addr)
 
bool expired (bt::TimeStamp now) const
 See if the item is expired.
 
const net::AddressgetAddress () const
 Get the address of an item.
 
DBItemoperator= (const DBItem &item)
 
bt::Uint32 pack (bt::Uint8 *buf) const
 

Detailed Description

Author
Joris Guisson

Item in the database, will keep track of an IP and port combination. As well as the time it was inserted.

Definition at line 62 of file database.h.

Member Function Documentation

◆ pack()

bt::Uint32 dht::DBItem::pack ( bt::Uint8 *  buf) const

Pack this item into a buffer, the buffer needs to big enough to handle IPv6 addresses (so 16 + 2 (for the port))

Parameters
bufThe buffer
Returns
The number of bytes used

The documentation for this class was generated from the following file: