---
name: "libssh2_channel_forward_accept"
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_forward_accept"
---

# libssh2\_channel\_forward\_accept(3)

accept a queued connection

## NAME

libssh2\_channel\_forward\_accept - accept a queued connection

## SYNOPSIS

```
#include <libssh2.h>
LIBSSH2_CHANNEL *
libssh2_channel_forward_accept(LIBSSH2_LISTENER *listener);
```

## DESCRIPTION

*listener* is a forwarding listener instance as returned by **[libssh2\_channel\_forward\_listen\_ex(3)](/libssh2_channel_forward_listen_ex/3.md)**.

## RETURN VALUE

A newly allocated channel instance or NULL on failure.

## ERRORS

When this function returns NULL use *[libssh2\_session\_last\_errno(3)](/libssh2_session_last_errno/3.md)* to extract the error code. If that code is *LIBSSH2\_ERROR\_EAGAIN*, the session is set to do non-blocking I/O but the call would block.

## SEE ALSO

**[libssh2\_channel\_forward\_listen\_ex(3)](/libssh2_channel_forward_listen_ex/3.md)**
