Browse Source

insert whole message to queue

pull/1514/head
orignal 5 years ago
parent
commit
7b418b3adf
  1. 9
      libi2pd/Streaming.cpp

9
libi2pd/Streaming.cpp

@ -423,15 +423,8 @@ namespace stream @@ -423,15 +423,8 @@ namespace stream
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);
return sent;
return len;
}
void Stream::AsyncSend (const uint8_t * buf, size_t len, SendHandler handler)

Loading…
Cancel
Save