mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
removed sync Receive operation
This commit is contained in:
parent
c9c38cccf6
commit
3cf256b769
2 changed files with 1 additions and 15 deletions
|
@ -242,20 +242,6 @@ namespace stream
|
|||
m_ReceiveQueue.WakeUp ();
|
||||
}
|
||||
}
|
||||
|
||||
size_t Stream::Receive (uint8_t * buf, size_t len, int timeout)
|
||||
{
|
||||
if (!m_IsOpen) return 0;
|
||||
if (m_ReceiveQueue.IsEmpty ())
|
||||
{
|
||||
if (!timeout) return 0;
|
||||
if (!m_ReceiveQueue.Wait (timeout, 0))
|
||||
return 0;
|
||||
}
|
||||
|
||||
// either non-empty or we have received something
|
||||
return ConcatenatePackets (buf, len);
|
||||
}
|
||||
|
||||
size_t Stream::ConcatenatePackets (uint8_t * buf, size_t len)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue