DTLSv1_get_timeout.pod 1.8 KB

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