On Sat, Apr 18, 2015 at 04:28:17PM +0800, Nathanael Rensen wrote:
> The tls_init(3) man page states:
> 
>      The tls_close(), tls_read() and tls_write() functions, along with the
>      tls_accept() and tls_connect() function families, have two special return
>      values:
> 
>            TLS_READ_AGAIN   A read operation is necessary to continue.
>            TLS_WRITE_AGAIN  A write operation is necessary to continue.
> 
>     The caller should call the appropriate function or, in the case of the
>     tls_close() and the tls_accept() and tls_connect() function families,
>     repeat the call.
> 
> I find the reference to "appropriate function" unclear. Perhaps there is
> some deeper meaning that I'm missing, but since in each case the required
> action is to repeat the call it is clearer to state that directly.
> 
> I've also included a note about the non-blocking case.
> 

i'm sorry, but i've failed to drum up much (any, to be honest) interest
in this. no one has replied publically either. so i'm dropping this from
my list.

having said that, the text seems perfectly clear to me. so i don;t
really see any problem.

jmc

> Index: tls_init.3
> ===================================================================
> RCS file: /cvs/src/lib/libtls/tls_init.3,v
> retrieving revision 1.23
> diff -u -p -r1.23 tls_init.3
> --- tls_init.3        3 Apr 2015 22:33:43 -0000       1.23
> +++ tls_init.3        18 Apr 2015 07:38:38 -0000
> @@ -424,13 +424,14 @@ A read operation is necessary to continu
>  A write operation is necessary to continue.
>  .El
>  .Pp
> -The caller should call the appropriate function or, in the case of the
> -.Fn tls_close
> -and the
> -.Fn tls_accept
> -and
> -.Fn tls_connect
> -function families, repeat the call.
> +In response to these return values the original call must be repeated
> +with the same arguments.
> +If the underlying socket is non-blocking the caller should first
> +confirm that the socket is ready to support the required operation,
> +such as by using
> +.Xr poll 2
> +or
> +.Xr select 2 .
>  .Sh ERRORS
>  The
>  .Fn tls_error
> 

Reply via email to