diff options
Diffstat (limited to 'src/lib/libcrypto/man/BIO_read.3')
| -rw-r--r-- | src/lib/libcrypto/man/BIO_read.3 | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/lib/libcrypto/man/BIO_read.3 b/src/lib/libcrypto/man/BIO_read.3 index 94a4fb1461..f19c31ecab 100644 --- a/src/lib/libcrypto/man/BIO_read.3 +++ b/src/lib/libcrypto/man/BIO_read.3 | |||
| @@ -1,12 +1,12 @@ | |||
| 1 | .\" $OpenBSD: BIO_read.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ | 1 | .\" $OpenBSD: BIO_read.3,v 1.3 2016/11/07 15:52:47 jmc Exp $ |
| 2 | .\" | 2 | .\" |
| 3 | .Dd $Mdocdate: November 6 2016 $ | 3 | .Dd $Mdocdate: November 7 2016 $ |
| 4 | .Dt BIO_READ 3 | 4 | .Dt BIO_READ 3 |
| 5 | .Os | 5 | .Os |
| 6 | .Sh NAME | 6 | .Sh NAME |
| 7 | .Nm BIO_read , | 7 | .Nm BIO_read , |
| 8 | .Nm BIO_write , | ||
| 9 | .Nm BIO_gets , | 8 | .Nm BIO_gets , |
| 9 | .Nm BIO_write , | ||
| 10 | .Nm BIO_puts | 10 | .Nm BIO_puts |
| 11 | .Nd BIO I/O functions | 11 | .Nd BIO I/O functions |
| 12 | .Sh SYNOPSIS | 12 | .Sh SYNOPSIS |
| @@ -69,17 +69,6 @@ attempts to write a null terminated string | |||
| 69 | .Fa buf | 69 | .Fa buf |
| 70 | to BIO | 70 | to BIO |
| 71 | .Fa b . | 71 | .Fa b . |
| 72 | .Sh RETURN VALUES | ||
| 73 | All these functions return either the amount of data successfully | ||
| 74 | read or written (if the return value is positive) or that no data | ||
| 75 | was successfully read or written if the result is 0 or -1. | ||
| 76 | If the return value is -2, then the operation is not implemented | ||
| 77 | in the specific BIO type. | ||
| 78 | .Sh NOTES | ||
| 79 | A 0 or -1 return is not necessarily an indication of an error. | ||
| 80 | In particular when the source/sink is non-blocking or of a certain type | ||
| 81 | it may merely be an indication that no data is currently available and that | ||
| 82 | the application should retry the operation later. | ||
| 83 | .Pp | 72 | .Pp |
| 84 | One technique sometimes used with blocking sockets | 73 | One technique sometimes used with blocking sockets |
| 85 | is to use a system call (such as | 74 | is to use a system call (such as |
| @@ -100,7 +89,7 @@ can cause several reads (and writes in the case of SSL BIOs) | |||
| 100 | on the underlying I/O structure and may block as a result. | 89 | on the underlying I/O structure and may block as a result. |
| 101 | Instead | 90 | Instead |
| 102 | .Xr select 2 | 91 | .Xr select 2 |
| 103 | (or equivalent) should be combined with non blocking I/O | 92 | (or equivalent) should be combined with non-blocking I/O |
| 104 | so successive reads will request a retry instead of blocking. | 93 | so successive reads will request a retry instead of blocking. |
| 105 | .Pp | 94 | .Pp |
| 106 | See | 95 | See |
| @@ -113,5 +102,16 @@ function is not supported by a BIO then it is possible to | |||
| 113 | work around this by adding a buffering BIO | 102 | work around this by adding a buffering BIO |
| 114 | .Xr BIO_f_buffer 3 | 103 | .Xr BIO_f_buffer 3 |
| 115 | to the chain. | 104 | to the chain. |
| 105 | .Sh RETURN VALUES | ||
| 106 | All these functions return either the amount of data successfully | ||
| 107 | read or written (if the return value is positive) or that no data | ||
| 108 | was successfully read or written if the result is 0 or -1. | ||
| 109 | If the return value is -2, then the operation is not implemented | ||
| 110 | in the specific BIO type. | ||
| 111 | .Pp | ||
| 112 | A 0 or -1 return is not necessarily an indication of an error. | ||
| 113 | In particular when the source/sink is non-blocking or of a certain type | ||
| 114 | it may merely be an indication that no data is currently available and that | ||
| 115 | the application should retry the operation later. | ||
| 116 | .Sh SEE ALSO | 116 | .Sh SEE ALSO |
| 117 | .Xr BIO_should_retry 3 | 117 | .Xr BIO_should_retry 3 |
