diff options
author | Jason McIntyre <jmc@cvs.openbsd.org> | 2016-11-07 15:52:48 +0000 |
---|---|---|
committer | Jason McIntyre <jmc@cvs.openbsd.org> | 2016-11-07 15:52:48 +0000 |
commit | ad01dc8a4a9df82d51e5f3c5f594a4c3b204e4f8 (patch) | |
tree | ed700f6435b2a62e82917d978b319c0c35e5e4ad /lib/libcrypto/man/BIO_read.3 | |
parent | f62e7bf8b9ae1e4775fa76682dbdfb6decb1d7b2 (diff) |
various cleanup;
Diffstat (limited to 'lib/libcrypto/man/BIO_read.3')
-rw-r--r-- | lib/libcrypto/man/BIO_read.3 | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/lib/libcrypto/man/BIO_read.3 b/lib/libcrypto/man/BIO_read.3 index 94a4fb14615..f19c31ecab6 100644 --- a/lib/libcrypto/man/BIO_read.3 +++ b/lib/libcrypto/man/BIO_read.3 @@ -1,12 +1,12 @@ -.\" $OpenBSD: BIO_read.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ +.\" $OpenBSD: BIO_read.3,v 1.3 2016/11/07 15:52:47 jmc Exp $ .\" -.Dd $Mdocdate: November 6 2016 $ +.Dd $Mdocdate: November 7 2016 $ .Dt BIO_READ 3 .Os .Sh NAME .Nm BIO_read , -.Nm BIO_write , .Nm BIO_gets , +.Nm BIO_write , .Nm BIO_puts .Nd BIO I/O functions .Sh SYNOPSIS @@ -69,17 +69,6 @@ attempts to write a null terminated string .Fa buf to BIO .Fa b . -.Sh RETURN VALUES -All these functions return either the amount of data successfully -read or written (if the return value is positive) or that no data -was successfully read or written if the result is 0 or -1. -If the return value is -2, then the operation is not implemented -in the specific BIO type. -.Sh NOTES -A 0 or -1 return is not necessarily an indication of an error. -In particular when the source/sink is non-blocking or of a certain type -it may merely be an indication that no data is currently available and that -the application should retry the operation later. .Pp One technique sometimes used with blocking sockets is to use a system call (such as @@ -100,7 +89,7 @@ can cause several reads (and writes in the case of SSL BIOs) on the underlying I/O structure and may block as a result. Instead .Xr select 2 -(or equivalent) should be combined with non blocking I/O +(or equivalent) should be combined with non-blocking I/O so successive reads will request a retry instead of blocking. .Pp See @@ -113,5 +102,16 @@ function is not supported by a BIO then it is possible to work around this by adding a buffering BIO .Xr BIO_f_buffer 3 to the chain. +.Sh RETURN VALUES +All these functions return either the amount of data successfully +read or written (if the return value is positive) or that no data +was successfully read or written if the result is 0 or -1. +If the return value is -2, then the operation is not implemented +in the specific BIO type. +.Pp +A 0 or -1 return is not necessarily an indication of an error. +In particular when the source/sink is non-blocking or of a certain type +it may merely be an indication that no data is currently available and that +the application should retry the operation later. .Sh SEE ALSO .Xr BIO_should_retry 3 |