[glib] gpollableoutputstream: document side effects of WOULD_BLOCK on D/TLS
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gpollableoutputstream: document side effects of WOULD_BLOCK on D/TLS
- Date: Wed, 31 Jan 2018 22:37:40 +0000 (UTC)
commit 1a991548988619350631713120a31c381fa8fa91
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date: Wed Jan 24 11:31:52 2018 +0100
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
gio/gpollableoutputstream.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gio/gpollableoutputstream.c b/gio/gpollableoutputstream.c
index 9bd6b8c..40c649f 100644
--- a/gio/gpollableoutputstream.c
+++ b/gio/gpollableoutputstream.c
@@ -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
* 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
* Returns: the number of bytes written, or -1 on error (including
* %G_IO_ERROR_WOULD_BLOCK).
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]