1=pod 2 3=head1 NAME 4 5DTLSv1_get_timeout - determine when a DTLS or QUIC SSL object next needs a 6timeout event to be handled 7 8=head1 SYNOPSIS 9 10 #include <openssl/ssl.h> 11 12 int DTLSv1_get_timeout(SSL *s, struct timeval *tv); 13 14=head1 DESCRIPTION 15 16DTLSv1_get_timeout() can be used on a DTLS or QUIC SSL object to determine when 17the SSL object next needs to perform internal processing due to the passage of 18time. 19 20Calling DTLSv1_get_timeout() results in I<*tv> being written with an amount of 21time left before the SSL object needs have DTLSv1_handle_timeout() called on it. 22If the SSL object needs to be ticked immediately, I<*tv> is zeroed and the 23function succeeds, returning 1. If no timeout is currently active, this function 24returns 0. 25 26This function is only applicable to DTLS and QUIC objects. It fails if called on 27any other kind of SSL object. 28 29Note that the value output by a call to DTLSv1_get_timeout() may change as a 30result of other calls to the SSL object. 31 32Once the timeout expires, DTLSv1_handle_timeout() should be called to handle any 33internal processing which is due; for more information, see 34L<DTLSv1_handle_timeout(3)>. 35 36L<SSL_get_event_timeout(3)> supersedes all use cases for this this function and 37may be used instead of it. 38 39=head1 RETURN VALUES 40 41On success, writes a duration to I<*tv> and returns 1. 42 43Returns 0 on failure, or if no timeout is currently active. 44 45=head1 SEE ALSO 46 47L<DTLSv1_handle_timeout(3)>, L<SSL_get_event_timeout(3)>, L<ssl(7)> 48 49=head1 COPYRIGHT 50 51Copyright 2023 The OpenSSL Project Authors. All Rights Reserved. 52 53Licensed under the Apache License 2.0 (the "License"). You may not use 54this file except in compliance with the License. You can obtain a copy 55in the file LICENSE in the source distribution or at 56L<https://www.openssl.org/source/license.html>. 57 58=cut 59