From 75564e0b59c13f6bb5f9c4eaf7852263a7b2991e Mon Sep 17 00:00:00 2001 From: bismuth01 Date: Tue, 15 Jul 2025 19:11:44 +0000 Subject: [PATCH 1/2] Move tls_connection.hpp to include/libp2p --- {src => include/libp2p}/security/tls/tls_connection.hpp | 0 src/security/tls/tls_adaptor.cpp | 3 +-- src/security/tls/tls_connection.cpp | 9 +++------ 3 files changed, 4 insertions(+), 8 deletions(-) rename {src => include/libp2p}/security/tls/tls_connection.hpp (100%) diff --git a/src/security/tls/tls_connection.hpp b/include/libp2p/security/tls/tls_connection.hpp similarity index 100% rename from src/security/tls/tls_connection.hpp rename to include/libp2p/security/tls/tls_connection.hpp diff --git a/src/security/tls/tls_adaptor.cpp b/src/security/tls/tls_adaptor.cpp index f195039ed..3aa819715 100644 --- a/src/security/tls/tls_adaptor.cpp +++ b/src/security/tls/tls_adaptor.cpp @@ -10,8 +10,7 @@ #include #include #include - -#include "tls_connection.hpp" +#include namespace libp2p::security { diff --git a/src/security/tls/tls_connection.cpp b/src/security/tls/tls_connection.cpp index a26840699..1d7fbf05e 100644 --- a/src/security/tls/tls_connection.cpp +++ b/src/security/tls/tls_connection.cpp @@ -4,10 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "tls_connection.hpp" - #include #include +#include #include namespace libp2p::connection { @@ -139,8 +138,7 @@ namespace libp2p::connection { }; } - void TlsConnection::readSome(BytesOut out, - Reader::ReadCallbackFunc cb) { + void TlsConnection::readSome(BytesOut out, Reader::ReadCallbackFunc cb) { SL_TRACE(log(), "reading some up to {} bytes", out.size()); socket_.async_read_some(asioBuffer(out), closeOnError(*this, std::move(cb))); @@ -151,8 +149,7 @@ namespace libp2p::connection { original_connection_->deferReadCallback(res, std::move(cb)); } - void TlsConnection::writeSome(BytesIn in, - Writer::WriteCallbackFunc cb) { + void TlsConnection::writeSome(BytesIn in, Writer::WriteCallbackFunc cb) { SL_TRACE(log(), "writing some up to {} bytes", in.size()); socket_.async_write_some(asioBuffer(in), closeOnError(*this, std::move(cb))); From ebe21fa9c8a95bc77d9f2f3d387a4516eed898f8 Mon Sep 17 00:00:00 2001 From: bismuth01 Date: Wed, 16 Jul 2025 10:02:48 +0000 Subject: [PATCH 2/2] Remove read_return_size from tls_connection.cpp --- src/security/tls/tls_connection.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/security/tls/tls_connection.cpp b/src/security/tls/tls_connection.cpp index 1d7fbf05e..e3cc84dfc 100644 --- a/src/security/tls/tls_connection.cpp +++ b/src/security/tls/tls_connection.cpp @@ -4,7 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include #include #include #include