mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-05-28 09:56:22 +02:00
move buffer when insert to buffer queue. clean entire queue in one call
This commit is contained in:
parent
78d97179b8
commit
3be4c7217f
3 changed files with 41 additions and 25 deletions
libi2pd
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2024, The PurpleI2P Project
|
||||
* Copyright (c) 2013-2025, The PurpleI2P Project
|
||||
*
|
||||
* This file is part of Purple i2pd project and licensed under BSD3
|
||||
*
|
||||
|
@ -150,7 +150,7 @@ namespace stream
|
|||
SendBufferQueue (): m_Size (0) {};
|
||||
~SendBufferQueue () { CleanUp (); };
|
||||
|
||||
void Add (std::shared_ptr<SendBuffer> buf);
|
||||
void Add (std::shared_ptr<SendBuffer>&& buf);
|
||||
size_t Get (uint8_t * buf, size_t len);
|
||||
size_t GetSize () const { return m_Size; };
|
||||
bool IsEmpty () const { return m_Buffers.empty (); };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue