---
name: "libssh2_channel_set_blocking"
section: "3"
platform: "linux"
package: "libssh2"
version: "1.11.1-7"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libssh2_channel_set_blocking"
---

# libssh2\_channel\_set\_blocking(3)

set or clear blocking mode on channel

## NAME

libssh2\_channel\_set\_blocking - set or clear blocking mode on channel

## SYNOPSIS

```
#include <libssh2.h>
void
libssh2_channel_set_blocking(LIBSSH2_CHANNEL *channel, int blocking);
```

## DESCRIPTION

*channel* - channel stream to set or clean blocking status on.

*blocking* - Set to a non-zero value to make the channel block, or zero to make it non-blocking.

Currently this is a short cut call to **[libssh2\_session\_set\_blocking(3)](/libssh2_session_set_blocking/3.md)** and therefore will affect the session and all channels.

## RETURN VALUE

None

## SEE ALSO

**[libssh2\_session\_set\_blocking(3)](/libssh2_session_set_blocking/3.md)** **[libssh2\_channel\_read\_ex(3)](/libssh2_channel_read_ex/3.md)** **[libssh2\_channel\_write\_ex(3)](/libssh2_channel_write_ex/3.md)**
