Use the correct semantics for sendcallback
This commit is contained in:
@@ -206,7 +206,12 @@ void WriteUntilBufferFull (Ptr<Socket> localSocket, uint32_t nBytes)
|
||||
char m = toascii (97 + i % 26);
|
||||
data[i] = m;
|
||||
}
|
||||
localSocket->Send (data, curSize);
|
||||
uint32_t amountSent = localSocket->Send (data, curSize);
|
||||
if(amountSent < curSize)
|
||||
{
|
||||
std::cout << "Socket blocking, returning" << std::endl;
|
||||
return;
|
||||
}
|
||||
nBytes -= curSize;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user