Make constexpr macros in DHTConstant.h

pull/454/head
Tatsuhiro Tsujikawa 2015-06-21 17:05:02 +09:00
parent 0b48bb1dbd
commit 7b3f94145d
1 changed files with 5 additions and 7 deletions

View File

@ -39,17 +39,15 @@
#include "TimerA2.h"
#include "a2functional.h"
namespace aria2 {
// Increment this if major improvements or bug fixes are made in DHT
// code. This is 2 bytes unsigned integer.
#define DHT_VERSION 3U
constexpr uint16_t DHT_VERSION = 3U;
#define DHT_ID_LENGTH 20
constexpr size_t DHT_ID_LENGTH = 20;
#define DHT_TRANSACTION_ID_LENGTH 2
#define DHT_TOKEN_LENGTH 4
namespace aria2 {
constexpr size_t DHT_TRANSACTION_ID_LENGTH = 2;
// See --dht-message-timeout option.
constexpr auto DHT_MESSAGE_TIMEOUT = 10_s;