summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/BIO_read.3
diff options
context:
space:
mode:
authorjmc <>2016-11-07 15:52:47 +0000
committerjmc <>2016-11-07 15:52:47 +0000
commit94a8013c0e6b484829cc3c8b697578760ad01405 (patch)
tree8e0eba7cbf154c12c52f4456e7f1e277c6e71d31 /src/lib/libcrypto/man/BIO_read.3
parente638403f591087e1ef609e3bc88e3028a97af60e (diff)
downloadopenbsd-94a8013c0e6b484829cc3c8b697578760ad01405.tar.gz
openbsd-94a8013c0e6b484829cc3c8b697578760ad01405.tar.bz2
openbsd-94a8013c0e6b484829cc3c8b697578760ad01405.zip
various cleanup;
Diffstat (limited to 'src/lib/libcrypto/man/BIO_read.3')
-rw-r--r--src/lib/libcrypto/man/BIO_read.330
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
70to BIO 70to BIO
71.Fa b . 71.Fa b .
72.Sh RETURN VALUES
73All these functions return either the amount of data successfully
74read or written (if the return value is positive) or that no data
75was successfully read or written if the result is 0 or -1.
76If the return value is -2, then the operation is not implemented
77in the specific BIO type.
78.Sh NOTES
79A 0 or -1 return is not necessarily an indication of an error.
80In particular when the source/sink is non-blocking or of a certain type
81it may merely be an indication that no data is currently available and that
82the application should retry the operation later.
83.Pp 72.Pp
84One technique sometimes used with blocking sockets 73One technique sometimes used with blocking sockets
85is to use a system call (such as 74is to use a system call (such as
@@ -100,7 +89,7 @@ can cause several reads (and writes in the case of SSL BIOs)
100on the underlying I/O structure and may block as a result. 89on the underlying I/O structure and may block as a result.
101Instead 90Instead
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
104so successive reads will request a retry instead of blocking. 93so successive reads will request a retry instead of blocking.
105.Pp 94.Pp
106See 95See
@@ -113,5 +102,16 @@ function is not supported by a BIO then it is possible to
113work around this by adding a buffering BIO 102work around this by adding a buffering BIO
114.Xr BIO_f_buffer 3 103.Xr BIO_f_buffer 3
115to the chain. 104to the chain.
105.Sh RETURN VALUES
106All these functions return either the amount of data successfully
107read or written (if the return value is positive) or that no data
108was successfully read or written if the result is 0 or -1.
109If the return value is -2, then the operation is not implemented
110in the specific BIO type.
111.Pp
112A 0 or -1 return is not necessarily an indication of an error.
113In particular when the source/sink is non-blocking or of a certain type
114it may merely be an indication that no data is currently available and that
115the 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