Skip to content

Commit 3dadf6f

Browse files
committed
Revert "Countable yamux and yamux read buffer"
This reverts commit e171915.
1 parent 046281f commit 3dadf6f

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

include/libp2p/muxer/yamux/yamuxed_connection.hpp

+1-8
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@
1818

1919
namespace libp2p::connection {
2020

21-
class CountableBuffer : public std::vector<uint8_t> {
22-
public:
23-
LIBP2P_METRICS_INSTANCE_COUNT_IF_ENABLED(
24-
libp2p::connection::CountableBuffer);
25-
};
26-
27-
2821
/**
2922
* Implementation of stream multiplexer - connection, which has only one
3023
* physical link to another peer, but many logical streams, for example, for
@@ -200,7 +193,7 @@ namespace libp2p::connection {
200193
bool started_ = false;
201194

202195
/// TODO(artem): change read() interface to reduce copying
203-
std::shared_ptr<CountableBuffer> raw_read_buffer_;
196+
std::shared_ptr<Buffer> raw_read_buffer_;
204197

205198
/// Buffering and segmenting
206199
YamuxReadingState reading_state_;

src/muxer/yamux/yamuxed_connection.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ namespace libp2p::connection {
3737
: config_(config),
3838
connection_(std::move(connection)),
3939
scheduler_(std::move(scheduler)),
40-
raw_read_buffer_(std::make_shared<CountableBuffer>()),
40+
raw_read_buffer_(std::make_shared<Buffer>()),
4141
reading_state_(
4242
[this](boost::optional<YamuxFrame> header) {
4343
return processHeader(std::move(header));

0 commit comments

Comments
 (0)