DTLSV1_GET_TIMEOUT(3ossl)
π¦ DTLSV1_GET_TIMEOUT(3ossl) β timeout check, but make it a whole vibe π¦
β¨ NAME β¨
DTLSv1_get_timeout β figure out when a DTLS or QUIC SSL object next needs a timeout event to be handled. Periodt.
β¨ SYNOPSIS β¨
#include <openssl/ssl.h>
int DTLSv1_get_timeout(SSL *s, struct timeval *tv);
β¨ DESCRIPTION β¨
Okay so DTLSv1_get_timeout() is your little clock-checker for a DTLS or QUIC SSL object. It tells you when that SSL object next needs to do internal processing because time has passed. Lowkey essential, no cap.
When you call DTLSv1_get_timeout(), *tv gets written with the amount of time left before the SSL object needs to have DTLSv1_handle_timeout() called on it. If the SSL object needs to be ticked immediately, *tv is zeroed and the function succeeds, returning 1. If no timeout is currently active, this function returns 0.
Heads up: this function is only applicable to DTLS and QUIC objects. It fails if you call it on any other kind of SSL object. No cap.
Also note: the value output by a call to DTLSv1_get_timeout() may change as a result of other calls to the SSL object. The way that tiny clock can move on you. π
Once the timeout expires, DTLSv1_handle_timeout() should be called to handle any internal processing which is due. For more info, see DTLSv1_handle_timeout(3).
And bestie, listen: SSL_get_event_timeout(3) supersedes all use cases for this function and may be used instead of it. Iconic replacement behavior. π
β¨ RETURN VALUES β¨
- On success, writes a duration to
*tvand returns1. Slay. - Returns
0on failure, or if no timeout is currently active. That's the vibe check failing.
β¨ SEE ALSO β¨
β¨ COPYRIGHT β¨
Copyright 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>.
Okay that's the whole page. This little gem comes from OpenSSL 3.5.0, dated 2026-09-25 β DTLSV1_GET_TIMEOUT(3ossl) signing off, mwah πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3-doc 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms