summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/BIO_s_accept.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_s_accept.3
parente638403f591087e1ef609e3bc88e3028a97af60e (diff)
downloadopenbsd-94a8013c0e6b484829cc3c8b697578760ad01405.tar.gz
openbsd-94a8013c0e6b484829cc3c8b697578760ad01405.tar.bz2
openbsd-94a8013c0e6b484829cc3c8b697578760ad01405.zip
various cleanup;
Diffstat (limited to 'src/lib/libcrypto/man/BIO_s_accept.3')
-rw-r--r--src/lib/libcrypto/man/BIO_s_accept.328
1 files changed, 15 insertions, 13 deletions
diff --git a/src/lib/libcrypto/man/BIO_s_accept.3 b/src/lib/libcrypto/man/BIO_s_accept.3
index 766d86e2a4..3cfb574977 100644
--- a/src/lib/libcrypto/man/BIO_s_accept.3
+++ b/src/lib/libcrypto/man/BIO_s_accept.3
@@ -1,6 +1,6 @@
1.\" $OpenBSD: BIO_s_accept.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ 1.\" $OpenBSD: BIO_s_accept.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_S_ACCEPT 3 4.Dt BIO_S_ACCEPT 3
5.Os 5.Os
6.Sh NAME 6.Sh NAME
@@ -63,7 +63,9 @@
63.Sh DESCRIPTION 63.Sh DESCRIPTION
64.Fn BIO_s_accept 64.Fn BIO_s_accept
65returns the accept BIO method. 65returns the accept BIO method.
66This is a wrapper round the platform's TCP/IP socket accept routines. 66This is a wrapper round the platform's TCP/IP socket
67.Xr accept 2
68routines.
67.Pp 69.Pp
68Using accept BIOs, TCP/IP connections can be accepted 70Using accept BIOs, TCP/IP connections can be accepted
69and data transferred using only BIO routines. 71and data transferred using only BIO routines.
@@ -81,12 +83,12 @@ but not
81.Xr BIO_gets 3 . 83.Xr BIO_gets 3 .
82.Pp 84.Pp
83If the close flag is set on an accept BIO, then any active 85If the close flag is set on an accept BIO, then any active
84connection on that chain is shutdown and the socket closed when 86connection on that chain is shut down and the socket closed when
85the BIO is freed. 87the BIO is freed.
86.Pp 88.Pp
87Calling 89Calling
88.Xr BIO_reset 3 90.Xr BIO_reset 3
89on a accept BIO will close any active connection and reset the BIO 91on an accept BIO will close any active connection and reset the BIO
90into a state where it awaits another incoming connection. 92into a state where it awaits another incoming connection.
91.Pp 93.Pp
92.Xr BIO_get_fd 3 94.Xr BIO_get_fd 3
@@ -108,13 +110,13 @@ is the interface to use and
108.Ar port 110.Ar port
109is the port. 111is the port.
110Either or both values can be 112Either or both values can be
111.Qq * 113.Qq * ,
112which is interpreted as meaning any interface or port respectively. 114which is interpreted as meaning any interface or port respectively.
113.Ar port 115.Ar port
114has the same syntax as the port specified in 116has the same syntax as the port specified in
115.Xr BIO_set_conn_port 3 117.Xr BIO_set_conn_port 3
116for connect BIOs. 118for connect BIOs.
117It can be a numerical port string or a string to lookup using 119It can be a numerical port string or a string to look up using
118.Xr getservbyname 3 120.Xr getservbyname 3
119and a string table. 121and a string table.
120.Pp 122.Pp
@@ -130,7 +132,7 @@ It creates a new accept BIO with port
130.Fn BIO_set_nbio_accept 132.Fn BIO_set_nbio_accept
131sets the accept socket to blocking mode (the default) if 133sets the accept socket to blocking mode (the default) if
132.Fa n 134.Fa n
133is 0 or non blocking mode if 135is 0 or non-blocking mode if
134.Fa n 136.Fa n
135is 1. 137is 1.
136.Pp 138.Pp
@@ -139,7 +141,7 @@ can be used to set a chain of BIOs which will be duplicated
139and prepended to the chain when an incoming connection is received. 141and prepended to the chain when an incoming connection is received.
140This is useful if, for example, a buffering or SSL BIO 142This is useful if, for example, a buffering or SSL BIO
141is required for each connection. 143is required for each connection.
142The chain of BIOs must not be freed after this call, 144The chain of BIOs must not be freed after this call -
143they will be automatically freed when the accept BIO is freed. 145they will be automatically freed when the accept BIO is freed.
144.Pp 146.Pp
145.Fn BIO_set_bind_mode 147.Fn BIO_set_bind_mode
@@ -162,11 +164,11 @@ then a second attempt is made using
162.Pp 164.Pp
163.Fn BIO_do_accept 165.Fn BIO_do_accept
164serves two purposes. 166serves two purposes.
165When it is first called, after the accept BIO has been setup, 167When it is first called, after the accept BIO has been set up,
166it will attempt to create the accept socket and bind an address to it. 168it will attempt to create the accept socket and bind an address to it.
167Second and subsequent calls to 169Second and subsequent calls to
168.Fn BIO_do_accept 170.Fn BIO_do_accept
169will await an incoming connection, or request a retry in non blocking mode. 171will await an incoming connection, or request a retry in non-blocking mode.
170.Sh NOTES 172.Sh NOTES
171When an accept BIO is at the end of a chain, it will await an 173When an accept BIO is at the end of a chain, it will await an
172incoming connection before processing I/O calls. 174incoming connection before processing I/O calls.
@@ -181,8 +183,8 @@ socket will await an incoming connection then perform I/O on it.
181.Pp 183.Pp
182If any additional BIOs have been set using 184If any additional BIOs have been set using
183.Fn BIO_set_accept_bios , 185.Fn BIO_set_accept_bios ,
184then they are placed between the socket and the accept BIO, 186then they are placed between the socket and the accept BIO;
185that is the chain will be accept->otherbios->socket. 187that is, the chain will be accept->otherbios->socket.
186.Pp 188.Pp
187If a server wishes to process multiple connections (as is normally 189If a server wishes to process multiple connections (as is normally
188the case), then the accept BIO must be made available for further 190the case), then the accept BIO must be made available for further