mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
updated liteserver
- new methods for liteserver/liteclient - added ADNL/DHT client-only work mode - fixed crash in ADNL
This commit is contained in:
parent
acf16718e6
commit
53ec9684bd
70 changed files with 816 additions and 322 deletions
|
@ -155,6 +155,16 @@ td::Result<AdnlAddressList> AdnlAddressList::create(const tl_object_ptr<ton_api:
|
|||
return A;
|
||||
}
|
||||
|
||||
td::Status AdnlAddressList::add_udp_address(td::IPAddress addr) {
|
||||
if (addr.is_ipv4()) {
|
||||
auto r = td::make_ref<AdnlAddressUdp>(addr.get_ipv4(), static_cast<td::uint16>(addr.get_port()));
|
||||
addrs_.push_back(std::move(r));
|
||||
return td::Status::OK();
|
||||
} else {
|
||||
return td::Status::Error(ErrorCode::protoviolation, "only works with ipv4");
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace adnl
|
||||
|
||||
} // namespace ton
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue