Block means block.

This commit is contained in:
Sara Golemon 2005-04-05 23:08:41 +00:00
parent ae9ad1ef6f
commit ba420fc7bf

View File

@ -535,6 +535,15 @@ static int libssh2_blocking_read(LIBSSH2_SESSION *session, unsigned char *buf, s
size_t bytes_read = 0;
int polls = 0;
#ifndef WIN32
fcntl(session->socket_fd, F_SETFL, 0);
#else
{
u_long block = FALSE;
ioctlsocket(session->socket_fd, FIONBIO, &block);
}
#endif
while (bytes_read < count) {
int ret;