help-gnutls
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gnutls] gnutls_write semantics


From: Nikos Mavroyanopoulos
Subject: Re: [Help-gnutls] gnutls_write semantics
Date: Tue, 30 Oct 2001 01:00:32 +0200

On Mon, 29 Oct 2001 11:13:20 -0600 Jon Nelson <address@hidden> 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,
> address@hidden    "@'/ ,. \`@"   Klaatu
> C and Python Programmer   /_| \__/ |_\   barada
> Motorcycle Enthusiast        \__U_/      nikto.
> 
> _______________________________________________
> Help-gnutls mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/help-gnutls
> 


-- 
Nikos Mavroyanopoulos
mailto:address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]