DTLSV1_GET_TIMEOUT(3ossl)

πŸ’… DTLSV1_GET_TIMEOUT πŸ’…

okay bestie, welcome to the ossl manual, section 3 β€” this is the page for DTLSv1_get_timeout, and it's literally the "when do I need to wake up again??" function. no cap.


✨ NAME ✨

DTLSv1_get_timeout β€” figure out when a DTLS or QUIC SSL object next needs a timeout event to be handled πŸ‘€


🌸 SYNOPSIS 🌸

#include <openssl/ssl.h>

int DTLSv1_get_timeout(SSL *s, struct timeval *tv);

πŸ¦‹ DESCRIPTION πŸ¦‹

so DTLSv1_get_timeout() is what you call on a DTLS or QUIC SSL object when you wanna know when that SSL object next needs to do internal processing because, like, time passed. ⏰ it's giving "bestie, set me a reminder."

when you call DTLSv1_get_timeout(), it writes into *tv the amount of time left before the SSL object needs to have DTLSv1_handle_timeout() called on it. periodt.

  • if the SSL object needs to be ticked immediately, then *tv gets zeroed and the function still succeeds β€” returning 1. slay.
  • if no timeout is currently active, this function returns 0. πŸ’€
heads up: this function is only applicable to DTLS and QUIC objects. call it on any other kind of SSL object and it fails. it said no. πŸ™ˆ

also lowkey important: the value output by a call to DTLSv1_get_timeout() may change as a result of other calls to the SSL object. so don't go treating it like it's set in stone, bestie. things move. 🌈

once the timeout expires, you should call DTLSv1_handle_timeout() to handle any internal processing that's due β€” for more info, go see DTLSv1_handle_timeout(3). 🫢

and finally: SSL_get_event_timeout(3) supersedes all use cases for this function and may be used instead of it. so like… if you're picking, that one's the main character. πŸ‘‘


πŸ’– RETURN VALUES πŸ’–

  • On success β€” writes a duration to *tv and returns 1. ate. ✨
  • Returns 0 on failure, or if no timeout is currently active. 😭

πŸ‘‘ SEE ALSO πŸ‘‘

DTLSv1_handle_timeout(3), SSL_get_event_timeout(3), ssl(7)


Copyright 2023-2026 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>.


and that's the whole page, bestie!! this was OpenSSL version 3.5.9, dated 2026-09-29, living its best life as DTLSV1_GET_TIMEOUT(3ossl). go set those timers. mwah πŸ’‹πŸŒΈβœ¨

πŸ“¦ where this page comes from