---
name: "SSL_get_rpoll_descriptor"
section: "3ssl"
platform: "linux"
package: "openssl"
version: "3.6.5-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/SSL_get_rpoll_descriptor"
---

# SSL\_get\_rpoll\_descriptor(3ssl)

obtain information which can be used to determine when network I/O can be performed

## NAME

SSL\_get\_rpoll\_descriptor, SSL\_get\_wpoll\_descriptor, SSL\_net\_read\_desired, SSL\_net\_write\_desired - obtain information which can be used to determine when network I/O can be performed

## SYNOPSIS

```
 #include <openssl/ssl.h>
 int SSL_get_rpoll_descriptor(SSL *s, BIO_POLL_DESCRIPTOR *desc);
 int SSL_get_wpoll_descriptor(SSL *s, BIO_POLL_DESCRIPTOR *desc);
 int SSL_net_read_desired(SSL *s);
 int SSL_net_write_desired(SSL *s);
```

## DESCRIPTION

The functions **SSL\_get\_rpoll\_descriptor()** and **SSL\_get\_wpoll\_descriptor()** can be used to determine when an SSL object which represents a QUIC connection can perform useful network I/O, so that an application using a QUIC connection SSL object in nonblocking mode can determine when it should call **SSL\_handle\_events()**.

On success, these functions output poll descriptors. For more information on poll descriptors, see **BIO\_get\_rpoll\_descriptor**(3).

The functions **SSL\_net\_read\_desired()** and **SSL\_net\_write\_desired()** return 1 or 0 depending on whether the SSL object is currently interested in receiving data from the network and/or writing data to the network respectively. If an SSL object is not interested in reading data from the network at the current time, **SSL\_net\_read\_desired()** will return 0; likewise, if an SSL object is not interested in writing data to the network at the current time, **SSL\_net\_write\_desired()** will return 0.

The intention is that an application using QUIC in nonblocking mode can use these calls, in conjunction with **SSL\_get\_event\_timeout**(3) to wait for network I/O conditions which allow the SSL object to perform useful work. When such a condition arises, **SSL\_handle\_events**(3) should be called.

In particular, the expected usage is as follows:

- •

  **SSL\_handle\_events()** should be called whenever the timeout returned by **SSL\_get\_event\_timeout**(3) (if any) expires

- •

  If the last call to **SSL\_net\_read\_desired()** returned 1, **SSL\_handle\_events()** should be called whenever the poll descriptor output by **SSL\_get\_rpoll\_descriptor()** becomes readable.

- •

  If the last call to **SSL\_net\_write\_desired()** returned 1, **SSL\_handle\_events()** should be called whenever the poll descriptor output by **SSL\_get\_wpoll\_descriptor()** becomes writable.

The return values of the **SSL\_net\_read\_desired()** and **SSL\_net\_write\_desired()** functions may change in response to any call to the SSL object other than **SSL\_net\_read\_desired()**, **SSL\_net\_write\_desired()**, **SSL\_get\_rpoll\_descriptor()**, **SSL\_get\_wpoll\_descriptor()** and **SSL\_get\_event\_timeout()**.

On non-QUIC SSL objects, calls to **SSL\_get\_rpoll\_descriptor()** and **SSL\_get\_wpoll\_descriptor()** function the same as calls to **BIO\_get\_rpoll\_descriptor()** and **BIO\_get\_wpoll\_descriptor()** on the respective read and write BIOs configured on the SSL object.

On non-QUIC SSL objects, calls to **SSL\_net\_read\_desired()** and **SSL\_net\_write\_desired()** function identically to calls to **SSL\_want\_read()** and **SSL\_want\_write()** respectively.

## RETURN VALUES

These functions return 1 on success and 0 on failure.

## SEE ALSO

**SSL\_handle\_events**(3), **SSL\_get\_event\_timeout**(3), [**ssl**(7)](/ssl/7.md)

## HISTORY

The **SSL\_get\_rpoll\_descriptor()**, **SSL\_get\_wpoll\_descriptor()**, **SSL\_net\_read\_desired()** and **SSL\_net\_write\_desired()** functions were added in OpenSSL 3.2.

## COPYRIGHT

Copyright 2022-2023 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License").  You may not use this file except in compliance with the License.  You can obtain a copy in the file LICENSE in the source distribution or at \<https://www.openssl.org/source/license.html\>.
