small refactor

master
Vectozavr 2021-10-25 18:51:34 +07:00
parent 0accf4857b
commit 0cb7276943
2 changed files with 2 additions and 1 deletions

View File

@ -30,7 +30,7 @@ namespace Consts {
const double TAP_DELAY = 0.2; const double TAP_DELAY = 0.2;
const unsigned NETWORK_VERSION = 1U; const unsigned NETWORK_VERSION = 1U;
const int NETWORK_TIMEOUT = 1U; const int NETWORK_TIMEOUT = 5U;
const int NETWORK_WORLD_UPDATE_RATE = 30; const int NETWORK_WORLD_UPDATE_RATE = 30;
const double NETWORK_RELIABLE_RETRY_TIME = 1.0/20; const double NETWORK_RELIABLE_RETRY_TIME = 1.0/20;
const uint16_t NETWORK_MAX_CLIENTS = 64; const uint16_t NETWORK_MAX_CLIENTS = 64;

View File

@ -12,6 +12,7 @@
ClientUDP::ClientUDP() : _lastBroadcast(-std::numeric_limits<double>::max()), _working(false) ClientUDP::ClientUDP() : _lastBroadcast(-std::numeric_limits<double>::max()), _working(false)
{ {
// TODO: replace this with lambda
_socket.setTimeoutCallback(std::bind(&ClientUDP::timeout, this, std::placeholders::_1)); _socket.setTimeoutCallback(std::bind(&ClientUDP::timeout, this, std::placeholders::_1));
} }