small refactor
parent
0accf4857b
commit
0cb7276943
|
@ -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;
|
||||||
|
|
|
@ -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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue