---
name: "libssh2_channel_handle_extended_data2"
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_handle_extended_data2"
---

# libssh2\_channel\_handle\_extended\_data2(3)

set extended data handling mode

## NAME

libssh2\_channel\_handle\_extended\_data2 - set extended data handling mode

## SYNOPSIS

```
#include <libssh2.h>
int
libssh2_channel_handle_extended_data2(LIBSSH2_CHANNEL *channel,
                                      int ignore_mode);
```

## DESCRIPTION

*channel* - Active channel stream to change extended data handling on.

*ignore\_mode* - One of the three LIBSSH2\_CHANNEL\_EXTENDED\_DATA\_\* Constants.\
 **LIBSSH2\_CHANNEL\_EXTENDED\_DATA\_NORMAL**: Queue extended data for eventual reading\
 **LIBSSH2\_CHANNEL\_EXTENDED\_DATA\_MERGE**: Treat extended data and ordinary data the same. Merge all substreams such that calls to **[libssh2\_channel\_read(3)](/libssh2_channel_read/3.md)** will pull from all substreams on a first-in/first-out basis.\
 **LIBSSH2\_CHANNEL\_EXTENDED\_DATA\_IGNORE**: Discard all extended data as it arrives.

Change how a channel deals with extended data packets. By default all extended data is queued until read by **[libssh2\_channel\_read\_ex(3)](/libssh2_channel_read_ex/3.md)**

## RETURN VALUE

Return 0 on success or LIBSSH2\_ERROR\_EAGAIN when it would otherwise block.

## SEE ALSO

**[libssh2\_channel\_handle\_extended\_data(3)](/libssh2_channel_handle_extended_data/3.md)** **[libssh2\_channel\_read\_ex(3)](/libssh2_channel_read_ex/3.md)**
