NORM_SYNC_ALL policy improvement
parent
c29ef4adbd
commit
46a030891d
|
|
@ -0,0 +1,30 @@
|
|||
#include "grttProbe.h"
|
||||
|
||||
// This code is _not_ part of the NORM protocol library. This
|
||||
// is an independent class that can be used as an alternative
|
||||
// to conduct the sort of GRTT probing that is conducted as part
|
||||
// of NORM protocol operation. This can be used in conjunction
|
||||
// with NORM by disabling NORM's built-in GRTT probing and using
|
||||
// the information collected from this independent probing to
|
||||
// dynamically and explicitly set the NORM sender GRTT estimate.
|
||||
|
||||
|
||||
using namespace GrttProbe
|
||||
{
|
||||
// return length in 32-bit words (i.e. 1 word == 4 bytes)
|
||||
unsigned int GetIdWords(IdType idType)
|
||||
{
|
||||
switch (idType)
|
||||
{
|
||||
case ID_INT32:
|
||||
case ID_IPV4:
|
||||
return 1;
|
||||
case ID_IPV6:
|
||||
return 4;
|
||||
case ID_ETH:
|
||||
return 2; // includes padding
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
} // end GrttProbe::Message::GetIdWords()
|
||||
}; // end namespace GrttProbe
|
||||
|
|
@ -813,7 +813,7 @@ void NormSenderNode::HandleCommand(const struct timeval& currentTime,
|
|||
}
|
||||
if (!synchronized)
|
||||
{
|
||||
if (doAck)
|
||||
if ((doAck) || (SYNC_ALL == sync_policy))
|
||||
{
|
||||
// Force sync since we're expected to ACK
|
||||
// and request repair for object indicated
|
||||
|
|
|
|||
|
|
@ -2400,7 +2400,7 @@ void NormSession::RxSocketRecvHandler(ProtoSocket &theSocket,
|
|||
else
|
||||
{
|
||||
PLOG(PL_ERROR, "NormSession::RxSocketRecvHandler() warning: received bad message\n");
|
||||
}
|
||||
} // end if/else msg.InitFromBuffer()
|
||||
// If our system gets very busy reading sockets, we should occasionally
|
||||
// execute any timeouts to keep protocol operation smooth (i.e., sending feedback)
|
||||
// TBD - perhaps this should be time based
|
||||
|
|
|
|||
Loading…
Reference in New Issue