[Help-gnutls] gnutls_write semantics
Nikos Mavroyanopoulos
nmav at hellug.gr
Tue Oct 30 00:00:32 CET 2001
On Mon, 29 Oct 2001 11:13:20 -0600 Jon Nelson <jnelson at securepipe.com> wrote:
> I have been looking at using GNUTLS for a personal project,
> and didn't see explicit support for non-blocking I/O until
> 0.2.9 -- however, I read this in the source file and changelogs
> and it disturbs me -- it this statement still valid, and if so,
> will it be fixed (soon)? Otherwise, using GNUTLS for this
> particular project will have to wait.
> * If the EINTR is returned by the internal push function (write())
> * then GNUTLS_E_INTERRUPTED, will be returned. If GNUTLS_E_INTERRUPTED
> or
> * GNUTLS_E_AGAIN is returned you must call this function again, with the
> * same (exactly) parameters. Otherwise the write operation will be
> * corrupted and the connection will be terminated.
This is valid (for gnutls_write() only). This is not a bug.
If a write() is interrupted (eg. may have sent the half of the data), then gnutls
will have to send the rest, or abort. What is the problem in your case with that?
> On a side note: is the a logic behind returning something other than
> (-1,0,>0) in gnutls_{read,write} ?
gnutls_write() returns the data written to the peer. gnutls_read() returns
the data read from the peer. Negative values are error codes.
>
> --
> Jon Nelson \|/ ____ \|/ Gort,
> jnelson at securepipe.com "@'/ ,. \`@" Klaatu
> C and Python Programmer /_| \__/ |_\ barada
> Motorcycle Enthusiast \__U_/ nikto.
>
> _______________________________________________
> Help-gnutls mailing list
> Help-gnutls at gnu.org
> http://mail.gnu.org/mailman/listinfo/help-gnutls
>
--
Nikos Mavroyanopoulos
mailto:nmav at hellug.gr
More information about the Gnutls-help
mailing list