Closed mo3rfan closed 7 years ago
This turned out to be an implementation issue. I was blocking the "onDataChannel" callback thread by doing a join()
for the sending thread that started inside it, instead of a detach()
.
Thanks for the update, glad to hear this issue has been resolved.
When I try to send a few bytes worth of strings separately, which would collectively amount to 256kB, it would stall the connection and I'm unable to send anymore. The error I get is EAGAIN/EWOULDBLOCK with the error message as "Resource temporarily unavailable".
This is obviously filling up the usrsctp send buffer (which is around 256kB). I'm not sure why it's not being flushed considering that the receiving side does receive all the bytes upto 256kB. Even when I place generous amounts of sleep between each send, the buffer doesn't clear on its own.
This is only an issue when I try to send from the C/C++ program to the browser.