Public Member Functions | |
ThreeGppHttpObjectTracker () | |
Creates a new instance with all counters begin at zero. | |
uint16_t | GetNumOfObjectsReceived () const |
bool | IsEmpty () const |
bool | ObjectReceived (uint32_t &txSize, uint32_t &rxSize) |
Shall be invoked after all parts of a complete object have been received. | |
void | ObjectSent (uint32_t size) |
Shall be invoked when a whole object has been transmitted. | |
void | PartReceived (uint32_t size) |
Shall be invoked when an object part has been received. | |
Private Attributes | |
uint16_t | m_numOfObjectsReceived |
Number of whole objects that have been received so far. | |
std::list< uint32_t > | m_objectsSize |
Each entry is the size (in bytes) of object transmitted. | |
uint32_t | m_rxBuffer |
The accumulated size (in bytes) of parts of a whole object. | |
Definition at line 118 of file three-gpp-http-client-server-test.cc.
ThreeGppHttpObjectTestCase::ThreeGppHttpObjectTracker::ThreeGppHttpObjectTracker | ( | ) |
Creates a new instance with all counters begin at zero.
Definition at line 533 of file three-gpp-http-client-server-test.cc.
References NS_LOG_FUNCTION.
uint16_t ThreeGppHttpObjectTestCase::ThreeGppHttpObjectTracker::GetNumOfObjectsReceived | ( | ) | const |
Definition at line 584 of file three-gpp-http-client-server-test.cc.
Referenced by ThreeGppHttpObjectTestCase::DoRun().
bool ThreeGppHttpObjectTestCase::ThreeGppHttpObjectTracker::IsEmpty | ( | ) | const |
Definition at line 578 of file three-gpp-http-client-server-test.cc.
Referenced by ThreeGppHttpObjectTestCase::DoRun().
bool ThreeGppHttpObjectTestCase::ThreeGppHttpObjectTracker::ObjectReceived | ( | uint32_t & | txSize, |
uint32_t & | rxSize | ||
) |
Shall be invoked after all parts of a complete object have been received.
[out] | txSize | Size of the whole object (in bytes) when it was transmitted. |
[out] | rxSize | Size of the whole object (in bytes) received. |
Definition at line 555 of file three-gpp-http-client-server-test.cc.
References NS_LOG_FUNCTION.
Referenced by ThreeGppHttpObjectTestCase::ClientRxEmbeddedObjectCallback(), ThreeGppHttpObjectTestCase::ClientRxMainObjectCallback(), and ThreeGppHttpObjectTestCase::ServerRxCallback().
void ThreeGppHttpObjectTestCase::ThreeGppHttpObjectTracker::ObjectSent | ( | uint32_t | size | ) |
Shall be invoked when a whole object has been transmitted.
size | Size of the whole object (in bytes). |
Definition at line 541 of file three-gpp-http-client-server-test.cc.
References NS_LOG_FUNCTION.
Referenced by ThreeGppHttpObjectTestCase::ClientTxEmbeddedObjectRequestCallback(), ThreeGppHttpObjectTestCase::ClientTxMainObjectRequestCallback(), ThreeGppHttpObjectTestCase::ServerEmbeddedObjectCallback(), and ThreeGppHttpObjectTestCase::ServerMainObjectCallback().
void ThreeGppHttpObjectTestCase::ThreeGppHttpObjectTracker::PartReceived | ( | uint32_t | size | ) |
Shall be invoked when an object part has been received.
size | Size of the object part (in bytes). This amount will be accumulated until ObjectReceived() is invoked. |
Definition at line 548 of file three-gpp-http-client-server-test.cc.
References NS_LOG_FUNCTION.
Referenced by ThreeGppHttpObjectTestCase::ClientRxEmbeddedObjectPacketCallback(), ThreeGppHttpObjectTestCase::ClientRxMainObjectPacketCallback(), and ThreeGppHttpObjectTestCase::ServerRxCallback().
|
private |
Number of whole objects that have been received so far.
Definition at line 162 of file three-gpp-http-client-server-test.cc.
|
private |
Each entry is the size (in bytes) of object transmitted.
A new entry is pushed to the back when a new object is transmitted. The frontmost entry is then removed when a whole object is received, i.e., it's logically a first-in-first-out queue data structure.
Definition at line 158 of file three-gpp-http-client-server-test.cc.
|
private |
The accumulated size (in bytes) of parts of a whole object.
Definition at line 160 of file three-gpp-http-client-server-test.cc.