Set max size for received pkts queue
This commit is contained in:
parent
236b03c9b1
commit
da6d752b55
2 changed files with 3 additions and 1 deletions
|
@ -7,6 +7,7 @@
|
||||||
#define UDPC_BAD_MODE_SEND_INTERVAL (1.0f / 10.0f)
|
#define UDPC_BAD_MODE_SEND_INTERVAL (1.0f / 10.0f)
|
||||||
#define UDPC_SENT_PKTS_MAX_SIZE 33
|
#define UDPC_SENT_PKTS_MAX_SIZE 33
|
||||||
#define UDPC_QUEUED_PKTS_MAX_SIZE 32
|
#define UDPC_QUEUED_PKTS_MAX_SIZE 32
|
||||||
|
#define UDPC_RECEIVED_PKTS_MAX_SIZE 50
|
||||||
#define UDPC_GOOD_RTT_LIMIT_SEC 0.25f
|
#define UDPC_GOOD_RTT_LIMIT_SEC 0.25f
|
||||||
#define UDPC_PACKET_TIMEOUT_SEC 1.0f
|
#define UDPC_PACKET_TIMEOUT_SEC 1.0f
|
||||||
|
|
||||||
|
|
|
@ -21,17 +21,18 @@ toggledTimer(0.0f),
|
||||||
sentPkts(),
|
sentPkts(),
|
||||||
sendPkts(UDPC_QUEUED_PKTS_MAX_SIZE),
|
sendPkts(UDPC_QUEUED_PKTS_MAX_SIZE),
|
||||||
priorityPkts(UDPC_QUEUED_PKTS_MAX_SIZE),
|
priorityPkts(UDPC_QUEUED_PKTS_MAX_SIZE),
|
||||||
|
receivedPkts(UDPC_RECEIVED_PKTS_MAX_SIZE),
|
||||||
received(std::chrono::steady_clock::now()),
|
received(std::chrono::steady_clock::now()),
|
||||||
sent(std::chrono::steady_clock::now()),
|
sent(std::chrono::steady_clock::now()),
|
||||||
rtt(0.0f)
|
rtt(0.0f)
|
||||||
{
|
{
|
||||||
|
flags.set(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
UDPC::ConnectionData::ConnectionData(bool isServer, Context *ctx) :
|
UDPC::ConnectionData::ConnectionData(bool isServer, Context *ctx) :
|
||||||
UDPC::ConnectionData::ConnectionData()
|
UDPC::ConnectionData::ConnectionData()
|
||||||
{
|
{
|
||||||
if(isServer) {
|
if(isServer) {
|
||||||
flags.set(0);
|
|
||||||
flags.set(3);
|
flags.set(3);
|
||||||
id = UDPC::generateConnectionID(*ctx);
|
id = UDPC::generateConnectionID(*ctx);
|
||||||
flags.set(4);
|
flags.set(4);
|
||||||
|
|
Loading…
Reference in a new issue