Minor inaccuracy in gnutls_record_send() documentation?
The documentation of gnutls_record_send() says:
If GNUTLS_E_INTERRUPTED or GNUTLS_E_AGAIN is returned, you must call this function again, with the exact same parameters; alternatively you could provide a NULL pointer for data, and 0 for size. cf. gnutls_record_get_direction().
But I think this is no longer accurate since gnutls_record_discard_queued() was added. Now you have three choices: call with exact same parameters, call with NULL and 0, or call gnutls_record_discard_queued() and then call gnutls_record_send() with whatever you want. Correct?
Proposed revised text:
If GNUTLS_E_INTERRUPTED or GNUTLS_E_AGAIN is returned, you must call this function again with the exact same parameters, or provide a NULL pointer for data and 0 for 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 gnutls_record_send() with different parameters.