gpollableoutputstream: document side effects of WOULD_BLOCK on D/TLS

If the underlying transport is D/TLS the same data and data length
is required to be sent on the next iteration when a WOULD_BLOCK
happens. This is due to the fact that gnutls or openssl keep
an internal state for the data.

https://bugzilla.gnome.org/show_bug.cgi?id=792862
This commit is contained in:
Ignacio Casal Quinteiro 2018-01-24 11:31:52 +01:00 committed by Philip Withnall
parent 4752d72a60
commit 1a99154898

View File

@ -178,6 +178,9 @@ g_pollable_output_stream_default_write_nonblocking (GPollableOutputStream *stre
* may happen if you call this method after a source triggers due * may happen if you call this method after a source triggers due
* to having been cancelled. * to having been cancelled.
* *
* Also note that if %G_IO_ERROR_WOULD_BLOCK is returned some underlying
* transports like D/TLS require that you send the same @buffer and @count.
*
* Virtual: write_nonblocking * Virtual: write_nonblocking
* Returns: the number of bytes written, or -1 on error (including * Returns: the number of bytes written, or -1 on error (including
* %G_IO_ERROR_WOULD_BLOCK). * %G_IO_ERROR_WOULD_BLOCK).