Some file transfer updates

This commit is contained in:
WolverinDEV
2020-05-10 16:23:02 +02:00
parent dd4a871bf0
commit 4e3921502d
12 changed files with 742 additions and 233 deletions
+5 -1
View File
@@ -16,6 +16,7 @@ Buffer* transfer::allocate_buffer(size_t size) {
auto total_size = sizeof(Buffer) + size;
auto buffer = (Buffer*) malloc(total_size);
new (buffer) Buffer{};
buffer->capacity = size;
return buffer;
}
@@ -45,7 +46,10 @@ FileClient::~FileClient() {
LocalFileTransfer::LocalFileTransfer(filesystem::LocalFileSystem &fs) : file_system_{fs} {}
LocalFileTransfer::~LocalFileTransfer() = default;
bool LocalFileTransfer::start(const std::deque<std::shared_ptr<NetworkBinding>>& bindings) {
bool LocalFileTransfer::start(const std::deque<std::shared_ptr<NetworkBinding>>& bindings, const std::shared_ptr<pipes::SSL::Options>& ssl_options) {
assert(ssl_options);
this->ssl_options_ = ssl_options;
(void) this->start_client_worker();
{