tool/dnc: update dnc
Change-Id: I3c790221ed78af80f88a2bb54bf2319b27235be6
diff --git a/tools/common.h b/tools/common.h
index 94d06d2..3e143b5 100644
--- a/tools/common.h
+++ b/tools/common.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2023 Savoir-faire Linux Inc.
+ * Copyright (C) 2023 Savoir-faire Linux Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -23,6 +23,7 @@
namespace dhtnet {
using Buffer = std::shared_ptr<std::vector<uint8_t>>;
+constexpr size_t BUFFER_SIZE = 64 * 1024;
/**
* Attempt to retrieve the identity from the .ssh directory, and if none is found, generate a new
@@ -31,16 +32,21 @@
*/
dht::crypto::Identity loadIdentity(const std::filesystem::path& path);
// add certstore to the config
-std::unique_ptr<ConnectionManager::Config> connectionManagerConfig(const std::filesystem::path& path,
- dht::crypto::Identity identity,
- const std::string& bootstrap,
- std::shared_ptr<Logger> logger,
- tls::CertificateStore& certStore,
- std::shared_ptr<asio::io_context> ioContext,
- IceTransportFactory& iceFactory);
+std::unique_ptr<ConnectionManager::Config> connectionManagerConfig(
+ const std::filesystem::path& path,
+ dht::crypto::Identity identity,
+ const std::string& bootstrap,
+ std::shared_ptr<Logger> logger,
+ std::shared_ptr<tls::CertificateStore> certStore,
+ std::shared_ptr<asio::io_context> ioContext,
+ std::shared_ptr<dhtnet::IceTransportFactory> iceFactory,
+ const std::string& turn_host ="",
+ const std::string& turn_user="",
+ const std::string& turn_pass="",
+ const std::string& turn_realm="");
// add ioContext to readFromStdin
-template <typename T>
+template<typename T>
void readFromPipe(std::shared_ptr<ChannelSocket> socket, T input, Buffer buffer);
} // namespace dhtnet
\ No newline at end of file