1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Tonproxy improvements (#483)

* Bugfixes in rldp-http-proxy and http parser

* Tonlib: change liteservers on query timeout or connection close

* Increase maximum size of http request

* Minor bugfixes in http
This commit is contained in:
SpyCheese 2022-10-06 21:31:18 +03:00 committed by GitHub
parent cc9ce0eb28
commit caffdbb5ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 158 additions and 77 deletions

View file

@ -71,7 +71,7 @@ class RldpIn : public RldpImpl {
void send_query(adnl::AdnlNodeIdShort src, adnl::AdnlNodeIdShort dst, std::string name,
td::Promise<td::BufferSlice> promise, td::Timestamp timeout, td::BufferSlice data) override {
send_query_ex(src, dst, name, std::move(promise), timeout, std::move(data), default_mtu());
send_query_ex(src, dst, name, std::move(promise), timeout, std::move(data), default_mtu_);
}
void send_query_ex(adnl::AdnlNodeIdShort src, adnl::AdnlNodeIdShort dst, std::string name,
td::Promise<td::BufferSlice> promise, td::Timestamp timeout, td::BufferSlice data,
@ -101,6 +101,10 @@ class RldpIn : public RldpImpl {
void add_id(adnl::AdnlNodeIdShort local_id) override;
void get_conn_ip_str(adnl::AdnlNodeIdShort l_id, adnl::AdnlNodeIdShort p_id, td::Promise<td::string> promise) override;
void set_default_mtu(td::uint64 mtu) override {
default_mtu_ = mtu;
}
RldpIn(td::actor::ActorId<adnl::AdnlPeerTable> adnl) : adnl_(adnl) {
}
@ -116,6 +120,7 @@ class RldpIn : public RldpImpl {
std::set<TransferId> lru_set_;
RldpLru lru_;
td::uint32 lru_size_ = 0;
td::uint64 default_mtu_ = adnl::Adnl::get_mtu();
std::map<TransferId, td::uint64> max_size_;