Commit 9f7ada01 authored by aligungr's avatar aligungr

RLS improvements

parent 5733441b
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
static constexpr const int BUFFER_SIZE = 16384; static constexpr const int BUFFER_SIZE = 16384;
static constexpr const int LOOP_PERIOD = 1000; static constexpr const int LOOP_PERIOD = 1000;
static constexpr const int HEARTBEAT_THRESHOLD = 2000; static constexpr const int RECEIVE_TIMEOUT = 200;
static constexpr const int HEARTBEAT_THRESHOLD = 2000; // (LOOP_PERIOD + RECEIVE_TIMEOUT)'dan büyük olmalı
namespace nr::ue namespace nr::ue
{ {
...@@ -48,7 +49,7 @@ void RlsUdpTask::onLoop() ...@@ -48,7 +49,7 @@ void RlsUdpTask::onLoop()
uint8_t buffer[BUFFER_SIZE]; uint8_t buffer[BUFFER_SIZE];
InetAddress peerAddress; InetAddress peerAddress;
int size = m_server->Receive(buffer, BUFFER_SIZE, LOOP_PERIOD, peerAddress); int size = m_server->Receive(buffer, BUFFER_SIZE, RECEIVE_TIMEOUT, peerAddress);
if (size > 0) if (size > 0)
{ {
auto rlsMsg = rls::DecodeRlsMessage(OctetView{buffer, static_cast<size_t>(size)}); auto rlsMsg = rls::DecodeRlsMessage(OctetView{buffer, static_cast<size_t>(size)});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment