mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
async receive
This commit is contained in:
parent
3ae225fb41
commit
06b2500347
2 changed files with 11 additions and 5 deletions
|
@ -248,7 +248,12 @@ namespace stream
|
|||
return 0;
|
||||
}
|
||||
|
||||
// either non-empty or we have received empty
|
||||
// either non-empty or we have received something
|
||||
return ConcatenatePackets (buf, len);
|
||||
}
|
||||
|
||||
size_t Stream::ConcatenatePackets (uint8_t * buf, size_t len)
|
||||
{
|
||||
size_t pos = 0;
|
||||
while (pos < len)
|
||||
{
|
||||
|
@ -269,7 +274,7 @@ namespace stream
|
|||
break;
|
||||
}
|
||||
return pos;
|
||||
}
|
||||
}
|
||||
|
||||
bool Stream::SendPacket (Packet * packet)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue