mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
integrating the existing state of TON Storage / TON Payments / CPS Fift development branches
This commit is contained in:
parent
040df63c98
commit
4e2624459b
153 changed files with 10760 additions and 1695 deletions
36
rldp2/RldpReceiver.h
Normal file
36
rldp2/RldpReceiver.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
#pragma once
|
||||
|
||||
#include "Ack.h"
|
||||
#include "RldpSender.h"
|
||||
|
||||
namespace ton {
|
||||
namespace rldp2 {
|
||||
class RldpReceiver {
|
||||
public:
|
||||
RldpReceiver() = default;
|
||||
RldpReceiver(RldpSender::Config config) : config_(config) {
|
||||
}
|
||||
|
||||
struct ActionSendAck {
|
||||
Ack ack;
|
||||
};
|
||||
|
||||
struct ActionWait {
|
||||
td::Timestamp wait_till;
|
||||
};
|
||||
|
||||
td::Variant<ActionSendAck, ActionWait> next_action(td::Timestamp now);
|
||||
|
||||
bool on_received(td::uint32 seqno, td::Timestamp now);
|
||||
|
||||
void on_ack_sent(td::Timestamp now);
|
||||
|
||||
private:
|
||||
Ack ack;
|
||||
td::Timestamp send_ack_at_;
|
||||
td::uint32 cnt_{0};
|
||||
|
||||
RldpSender::Config config_;
|
||||
};
|
||||
} // namespace rldp2
|
||||
} // namespace ton
|
Loading…
Add table
Add a link
Reference in a new issue