diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2019-09-25 07:04:04 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2019-10-09 20:23:59 +0200 |
commit | 5f66f24ebc466c3db5b669925d44b46740b080ca (patch) | |
tree | eb4ed41f4a669f3e824015765b193bbfe199d0bc /lib/record.c | |
parent | fb791c361a641d7153d1e3e19b4a012236c6e8a4 (diff) | |
download | gnutls-5f66f24ebc466c3db5b669925d44b46740b080ca.tar.gz |
document limitations of gnutls_record_discard_queued() [ci skip]
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'lib/record.c')
-rw-r--r-- | lib/record.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/record.c b/lib/record.c index 7c7e365611..a610662ac0 100644 --- a/lib/record.c +++ b/lib/record.c @@ -1832,9 +1832,13 @@ void gnutls_packet_deinit(gnutls_packet_t packet) * gnutls_record_discard_queued: * @session: is a #gnutls_session_t type. * - * This function discards all queued to be sent packets in a TLS or DTLS session. + * This function discards all queued to be sent packets in a DTLS session. * These are the packets queued after an interrupted gnutls_record_send(). * + * This function can only be used with transports where send() is + * an all-or-nothing operation (e.g., UDP). When partial writes are allowed + * this function will cause session errors. + * * Returns: The number of bytes discarded. * * Since: 3.4.0 @@ -1935,7 +1939,8 @@ ssize_t append_data_to_corked(gnutls_session_t session, const void *data, size_t * %NULL pointer for @data and 0 for @data_size, in order to write the * same data as before. If you wish to discard the previous data instead * of retrying, you must call gnutls_record_discard_queued() before - * calling this function with different parameters. + * calling this function with different parameters. Note that the latter + * works only on special transports (e.g., UDP). * cf. gnutls_record_get_direction(). * * Note that in DTLS this function will return the %GNUTLS_E_LARGE_PACKET |