mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
emergency update
This commit is contained in:
parent
5d846e0aaf
commit
9f351fc29f
87 changed files with 2486 additions and 655 deletions
12
adnl/adnl.h
12
adnl/adnl.h
|
@ -14,7 +14,7 @@
|
|||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with TON Blockchain Library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2017-2019 Telegram Systems LLP
|
||||
Copyright 2017-2020 Telegram Systems LLP
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
|
@ -58,6 +58,8 @@ class AdnlSenderInterface : public td::actor::Actor {
|
|||
td::uint64 max_answer_size) = 0;
|
||||
};
|
||||
|
||||
class AdnlTunnel : public td::actor::Actor {};
|
||||
|
||||
class Adnl : public AdnlSenderInterface {
|
||||
public:
|
||||
class Callback {
|
||||
|
@ -88,10 +90,10 @@ class Adnl : public AdnlSenderInterface {
|
|||
virtual void add_static_nodes_from_config(AdnlNodesList nodes) = 0;
|
||||
|
||||
// adds local id. After that you can send/receive messages from/to this id
|
||||
void add_id(AdnlNodeIdFull id, AdnlAddressList addr_list) {
|
||||
add_id_ex(std::move(id), std::move(addr_list), 0);
|
||||
void add_id(AdnlNodeIdFull id, AdnlAddressList addr_list, td::uint8 cat) {
|
||||
add_id_ex(std::move(id), std::move(addr_list), cat, 0);
|
||||
}
|
||||
virtual void add_id_ex(AdnlNodeIdFull id, AdnlAddressList addr_list, td::uint32 mode) = 0;
|
||||
virtual void add_id_ex(AdnlNodeIdFull id, AdnlAddressList addr_list, td::uint8 cat, td::uint32 mode) = 0;
|
||||
virtual void del_id(AdnlNodeIdShort id, td::Promise<td::Unit> promise) = 0;
|
||||
|
||||
// subscribe to (some) messages(+queries) to this local id
|
||||
|
@ -113,6 +115,8 @@ class Adnl : public AdnlSenderInterface {
|
|||
|
||||
virtual void create_ext_server(std::vector<AdnlNodeIdShort> ids, std::vector<td::uint16> ports,
|
||||
td::Promise<td::actor::ActorOwn<AdnlExtServer>> promise) = 0;
|
||||
virtual void create_tunnel(AdnlNodeIdShort dst, td::uint32 size,
|
||||
td::Promise<std::pair<td::actor::ActorOwn<AdnlTunnel>, AdnlAddress>> promise) = 0;
|
||||
|
||||
static td::actor::ActorOwn<Adnl> create(std::string db, td::actor::ActorId<keyring::Keyring> keyring);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue