forest-net
an overlay networks for large-scale virtual worlds
|
Class to manage repeated sending of control packets. More...
#include <Repeater.h>
Public Member Functions | |
Repeater (int) | |
Constructor for Repeater. | |
~Repeater () | |
Destructor for Repeater. More... | |
int | saveReq (int, int64_t, int64_t, int=0) |
Save a copy of an outgoing request packet. More... | |
pair< int, int > | deleteMatch (int64_t) |
Match a reply to a saved request and update. More... | |
pair< int, int > | overdue (int64_t) |
Check for an overdue packet. More... | |
Private Attributes | |
int | n |
HashMap< int64_t, Pair< int, int >, Hash::s64 > * | pmap |
maps seqNum->(pktx,repCount) | |
Dheap< int64_t > * | deadlines |
heap of packets waiting on replies | |
Class to manage repeated sending of control packets.
Definition at line 28 of file Repeater.h.
forest::Repeater::~Repeater | ( | ) |
Destructor for Repeater.
Definition at line 21 of file Repeater.cpp.
pair< int, int > forest::Repeater::deleteMatch | ( | int64_t | seqNum) |
Match a reply to a saved request and update.
seqNum | is the sequence number assigned to the reply |
Definition at line 43 of file Repeater.cpp.
pair< int, int > forest::Repeater::overdue | ( | int64_t | now) |
Check for an overdue packet.
now | is the current time |
Definition at line 60 of file Repeater.cpp.
int forest::Repeater::saveReq | ( | int | cx, |
int64_t | seqNum, | ||
int64_t | now, | ||
int | idx = 0 |
||
) |
Save a copy of an outgoing request packet.
cx | is a copy of some outgoing request packet |
seqNum | is the sequence number assigned to the packet |
now | is the current time |
idx | is an optional index that identifies the saved copy; if zero, an index is assigned automatically |
Definition at line 32 of file Repeater.cpp.