.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "SSL_GET_RPOLL_DESCRIPTOR 3ssl" .TH SSL_GET_RPOLL_DESCRIPTOR 3ssl 2024-04-28 3.3.0 OpenSSL .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH 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 .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& #include \& \& 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); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" The functions \fBSSL_get_rpoll_descriptor()\fR and \fBSSL_get_wpoll_descriptor()\fR 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 \fBSSL_handle_events()\fR. .PP On success, these functions output poll descriptors. For more information on poll descriptors, see \fBBIO_get_rpoll_descriptor\fR\|(3). .PP The functions \fBSSL_net_read_desired()\fR and \fBSSL_net_write_desired()\fR 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, \fBSSL_net_read_desired()\fR will return 0; likewise, if an SSL object is not interested in writing data to the network at the current time, \&\fBSSL_net_write_desired()\fR will return 0. .PP The intention is that an application using QUIC in nonblocking mode can use these calls, in conjunction with \fBSSL_get_event_timeout\fR\|(3) to wait for network I/O conditions which allow the SSL object to perform useful work. When such a condition arises, \fBSSL_handle_events\fR\|(3) should be called. .PP In particular, the expected usage is as follows: .IP \(bu 4 \&\fBSSL_handle_events()\fR should be called whenever the timeout returned by \&\fBSSL_get_event_timeout\fR\|(3) (if any) expires .IP \(bu 4 If the last call to \fBSSL_net_read_desired()\fR returned 1, \fBSSL_handle_events()\fR should be called whenever the poll descriptor output by \fBSSL_get_rpoll_descriptor()\fR becomes readable. .IP \(bu 4 If the last call to \fBSSL_net_write_desired()\fR returned 1, \fBSSL_handle_events()\fR should be called whenever the poll descriptor output by \fBSSL_get_wpoll_descriptor()\fR becomes writable. .PP The return values of the \fBSSL_net_read_desired()\fR and \fBSSL_net_write_desired()\fR functions may change in response to any call to the SSL object other than \&\fBSSL_net_read_desired()\fR, \fBSSL_net_write_desired()\fR, \fBSSL_get_rpoll_descriptor()\fR, \&\fBSSL_get_wpoll_descriptor()\fR and \fBSSL_get_event_timeout()\fR. .PP On non-QUIC SSL objects, calls to \fBSSL_get_rpoll_descriptor()\fR and \&\fBSSL_get_wpoll_descriptor()\fR function the same as calls to \&\fBBIO_get_rpoll_descriptor()\fR and \fBBIO_get_wpoll_descriptor()\fR on the respective read and write BIOs configured on the SSL object. .PP On non-QUIC SSL objects, calls to \fBSSL_net_read_desired()\fR and \&\fBSSL_net_write_desired()\fR function identically to calls to \fBSSL_want_read()\fR and \&\fBSSL_want_write()\fR respectively. .SH "RETURN VALUES" .IX Header "RETURN VALUES" These functions return 1 on success and 0 on failure. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBSSL_handle_events\fR\|(3), \fBSSL_get_event_timeout\fR\|(3), \fBssl\fR\|(7) .SH HISTORY .IX Header "HISTORY" The \fBSSL_get_rpoll_descriptor()\fR, \fBSSL_get_wpoll_descriptor()\fR, \fBSSL_net_read_desired()\fR and \fBSSL_net_write_desired()\fR functions were added in OpenSSL 3.2. .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright 2022\-2023 The OpenSSL Project Authors. All Rights Reserved. .PP 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 .