Changeset View
Changeset View
Standalone View
Standalone View
src/net.h
Show First 20 Lines • Show All 301 Lines • ▼ Show 20 Lines | public: | ||||
//! set the max outbound target in bytes. | //! set the max outbound target in bytes. | ||||
void SetMaxOutboundTarget(uint64_t limit); | void SetMaxOutboundTarget(uint64_t limit); | ||||
uint64_t GetMaxOutboundTarget(); | uint64_t GetMaxOutboundTarget(); | ||||
//! set the timeframe for the max outbound target. | //! set the timeframe for the max outbound target. | ||||
void SetMaxOutboundTimeframe(uint64_t timeframe); | void SetMaxOutboundTimeframe(uint64_t timeframe); | ||||
uint64_t GetMaxOutboundTimeframe(); | uint64_t GetMaxOutboundTimeframe(); | ||||
//! check if the outbound target is reached. | //! check if the outbound target is reached. If param | ||||
// If param historicalBlockServingLimit is set true, the function will | //! historicalBlockServingLimit is set true, the function will response true | ||||
// response true if the limit for serving historical blocks has been | //! if the limit for serving historical blocks has been reached. | ||||
// reached. | |||||
bool OutboundTargetReached(bool historicalBlockServingLimit); | bool OutboundTargetReached(bool historicalBlockServingLimit); | ||||
//! response the bytes left in the current max outbound cycle | //! response the bytes left in the current max outbound cycle in case of no | ||||
// in case of no limit, it will always response 0 | //! limit, it will always response 0 | ||||
uint64_t GetOutboundTargetBytesLeft(); | uint64_t GetOutboundTargetBytesLeft(); | ||||
//! response the time in second left in the current max outbound cycle | //! response the time in second left in the current max outbound cycle in | ||||
// in case of no limit, it will always response 0 | //! case of no limit, it will always response 0 | ||||
uint64_t GetMaxOutboundTimeLeftInCycle(); | uint64_t GetMaxOutboundTimeLeftInCycle(); | ||||
uint64_t GetTotalBytesRecv(); | uint64_t GetTotalBytesRecv(); | ||||
uint64_t GetTotalBytesSent(); | uint64_t GetTotalBytesSent(); | ||||
void SetBestHeight(int height); | void SetBestHeight(int height); | ||||
int GetBestHeight() const; | int GetBestHeight() const; | ||||
▲ Show 20 Lines • Show All 603 Lines • Show Last 20 Lines |