From 6991632abf1af161f332bf38bd8517c7c2834b58 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Sat, 4 Apr 2020 12:30:54 -0400 Subject: accumulate fractional RTT values --- include/enet/enet.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/enet/enet.h b/include/enet/enet.h index 4a704ee..174e062 100644 --- a/include/enet/enet.h +++ b/include/enet/enet.h @@ -216,7 +216,7 @@ enum ENET_HOST_DEFAULT_MAXIMUM_PACKET_SIZE = 32 * 1024 * 1024, ENET_HOST_DEFAULT_MAXIMUM_WAITING_DATA = 32 * 1024 * 1024, - ENET_PEER_DEFAULT_ROUND_TRIP_TIME = 500, + ENET_PEER_DEFAULT_ROUND_TRIP_TIME = 350, ENET_PEER_DEFAULT_PACKET_THROTTLE = 32, ENET_PEER_PACKET_THROTTLE_SCALE = 32, ENET_PEER_PACKET_THROTTLE_COUNTER = 7, @@ -250,6 +250,11 @@ typedef struct _ENetChannel ENetList incomingUnreliableCommands; } ENetChannel; +typedef enum _ENetPeerFlag +{ + ENET_PEER_FLAG_NEEDS_DISPATCH = (1 << 0) +} ENetPeerFlag; + /** * An ENet peer which data packets may be sent or received from. * @@ -311,7 +316,9 @@ typedef struct _ENetPeer ENetList outgoingReliableCommands; ENetList outgoingUnreliableCommands; ENetList dispatchedCommands; - int needsDispatch; + enet_uint16 flags; + enet_uint8 roundTripTimeRemainder; + enet_uint8 roundTripTimeVarianceRemainder; enet_uint16 incomingUnsequencedGroup; enet_uint16 outgoingUnsequencedGroup; enet_uint32 unsequencedWindow [ENET_PEER_UNSEQUENCED_WINDOW_SIZE / 32]; -- cgit v1.2.3