send can fail silently when sending would block (EWOULDBLOCK return for send) (#18)
* try to use a pipe for communication * flush send buffer on the background thread * cleanup * linux fix / linux still use event fd for now * cleanup
This commit is contained in:
committed by
GitHub
parent
dedbeb3eab
commit
08c2cdbf1d
@ -257,6 +257,15 @@ namespace ix
|
||||
return true;
|
||||
});
|
||||
|
||||
do
|
||||
{
|
||||
size_t bufferedAmount = _webSocket.bufferedAmount();
|
||||
std::cout << bufferedAmount << " bytes left to be sent" << std::endl;
|
||||
|
||||
std::chrono::duration<double, std::milli> duration(10);
|
||||
std::this_thread::sleep_for(duration);
|
||||
} while (_webSocket.bufferedAmount() != 0);
|
||||
|
||||
bench.report();
|
||||
auto duration = bench.getDuration();
|
||||
auto transferRate = 1000 * content.size() / duration;
|
||||
|
Reference in New Issue
Block a user