mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-13 01:20:22 +03:00
insert whole message to queue
This commit is contained in:
parent
1c8d662e30
commit
7b418b3adf
@ -423,15 +423,8 @@ namespace stream
|
|||||||
|
|
||||||
size_t Stream::Send (const uint8_t * buf, size_t len)
|
size_t Stream::Send (const uint8_t * buf, size_t len)
|
||||||
{
|
{
|
||||||
size_t sent = len;
|
|
||||||
while(len > MAX_PACKET_SIZE)
|
|
||||||
{
|
|
||||||
AsyncSend (buf, MAX_PACKET_SIZE, nullptr);
|
|
||||||
buf += MAX_PACKET_SIZE;
|
|
||||||
len -= MAX_PACKET_SIZE;
|
|
||||||
}
|
|
||||||
AsyncSend (buf, len, nullptr);
|
AsyncSend (buf, len, nullptr);
|
||||||
return sent;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Stream::AsyncSend (const uint8_t * buf, size_t len, SendHandler handler)
|
void Stream::AsyncSend (const uint8_t * buf, size_t len, SendHandler handler)
|
||||||
|
Loading…
Reference in New Issue
Block a user