Behaviour of libssh2_channel_write when channel is not blocking
-
12-11-2019 - |
문제
From libssh2_channel_write_ex
man page:
Actual number of bytes written or negative on failure. LIBSSH2_ERROR_EAGAIN when it would otherwise block. While LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
Now I have a problem with that. When I receive LIBSSH2_ERROR_EAGAIN
does it mean that nothing was sent and that I must resend all data? Or does it mean that some data have been sent
My problem is that if I'm trying to send more data that the underlying socket can hold, write()
should block anyway, henceforth how can I hope to send a big block of data without getting LIBSSH2_ERROR_EAGAIN
every time?
올바른 솔루션이 없습니다
제휴하지 않습니다 StackOverflow