[gnutls-dev] API comments

Nikos Mavroyanopoulos nmav@hellug.gr
Sun Dec 2 21:45:01 2001


On Sun, 02 Dec 2001 01:09:47 +0100 Simon Josefsson <jas@extundo.com> wrote:

> gnutls_read() and gnutls_write() does not seem to work as read() and
> write() as the API documentation on the web page says, especially the
> error codes differ.  
It says that "Returns the number of bytes sent, or a negative error code.",
but it may still not be clear. What do you propose?

> I think it would be nice if they did work as
> read() and write(), I believe both Open SSL and Mozilla NSS do that.
I'm trying not to tight gnutls to berkeley style sockets, or even TCP/IP.

> It was unclear to me if gnutls_bye() did anything to the socket or not
> (like, e.g., calling shutdown()).  I want to be able to use the socket
> after disabling TLS, sending unencrypted packets.  Possible?
gnutls_bye() and any other gnutls function (except of gnutls_read()/write()),
do not call any external function such as shutdown. 
Thus in your case if the return value is zero you may continue using the connection.

> Documentation in info-format would be nice. :-)
Documentation in gnutls is in latex format. This can be
converted to several other formats. (and possibly info format but
I'm not sure)

-- 
Nikos Mavroyanopoulos
mailto:nmav@hellug.gr