mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
use SendBufferQueue for queued messages from I2P
This commit is contained in:
@@ -111,6 +111,11 @@ namespace stream
|
||||
buf = new uint8_t[len];
|
||||
memcpy (buf, b, len);
|
||||
}
|
||||
SendBuffer (size_t l): // creat empty buffer
|
||||
len(l), offset (0)
|
||||
{
|
||||
buf = new uint8_t[len];
|
||||
}
|
||||
~SendBuffer ()
|
||||
{
|
||||
delete[] buf;
|
||||
@@ -129,6 +134,7 @@ namespace stream
|
||||
~SendBufferQueue () { CleanUp (); };
|
||||
|
||||
void Add (const uint8_t * buf, size_t len, SendHandler handler);
|
||||
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 (); };
|
||||
|
||||
Reference in New Issue
Block a user