diff options
author | jmc <> | 2016-11-07 15:52:47 +0000 |
---|---|---|
committer | jmc <> | 2016-11-07 15:52:47 +0000 |
commit | 94a8013c0e6b484829cc3c8b697578760ad01405 (patch) | |
tree | 8e0eba7cbf154c12c52f4456e7f1e277c6e71d31 /src/lib/libcrypto/man/BIO_s_accept.3 | |
parent | e638403f591087e1ef609e3bc88e3028a97af60e (diff) | |
download | openbsd-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.3 | 28 |
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 |
65 | returns the accept BIO method. | 65 | returns the accept BIO method. |
66 | This is a wrapper round the platform's TCP/IP socket accept routines. | 66 | This is a wrapper round the platform's TCP/IP socket |
67 | .Xr accept 2 | ||
68 | routines. | ||
67 | .Pp | 69 | .Pp |
68 | Using accept BIOs, TCP/IP connections can be accepted | 70 | Using accept BIOs, TCP/IP connections can be accepted |
69 | and data transferred using only BIO routines. | 71 | and 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 |
83 | If the close flag is set on an accept BIO, then any active | 85 | If the close flag is set on an accept BIO, then any active |
84 | connection on that chain is shutdown and the socket closed when | 86 | connection on that chain is shut down and the socket closed when |
85 | the BIO is freed. | 87 | the BIO is freed. |
86 | .Pp | 88 | .Pp |
87 | Calling | 89 | Calling |
88 | .Xr BIO_reset 3 | 90 | .Xr BIO_reset 3 |
89 | on a accept BIO will close any active connection and reset the BIO | 91 | on an accept BIO will close any active connection and reset the BIO |
90 | into a state where it awaits another incoming connection. | 92 | into 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 |
109 | is the port. | 111 | is the port. |
110 | Either or both values can be | 112 | Either or both values can be |
111 | .Qq * | 113 | .Qq * , |
112 | which is interpreted as meaning any interface or port respectively. | 114 | which is interpreted as meaning any interface or port respectively. |
113 | .Ar port | 115 | .Ar port |
114 | has the same syntax as the port specified in | 116 | has the same syntax as the port specified in |
115 | .Xr BIO_set_conn_port 3 | 117 | .Xr BIO_set_conn_port 3 |
116 | for connect BIOs. | 118 | for connect BIOs. |
117 | It can be a numerical port string or a string to lookup using | 119 | It can be a numerical port string or a string to look up using |
118 | .Xr getservbyname 3 | 120 | .Xr getservbyname 3 |
119 | and a string table. | 121 | and 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 |
131 | sets the accept socket to blocking mode (the default) if | 133 | sets the accept socket to blocking mode (the default) if |
132 | .Fa n | 134 | .Fa n |
133 | is 0 or non blocking mode if | 135 | is 0 or non-blocking mode if |
134 | .Fa n | 136 | .Fa n |
135 | is 1. | 137 | is 1. |
136 | .Pp | 138 | .Pp |
@@ -139,7 +141,7 @@ can be used to set a chain of BIOs which will be duplicated | |||
139 | and prepended to the chain when an incoming connection is received. | 141 | and prepended to the chain when an incoming connection is received. |
140 | This is useful if, for example, a buffering or SSL BIO | 142 | This is useful if, for example, a buffering or SSL BIO |
141 | is required for each connection. | 143 | is required for each connection. |
142 | The chain of BIOs must not be freed after this call, | 144 | The chain of BIOs must not be freed after this call - |
143 | they will be automatically freed when the accept BIO is freed. | 145 | they 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 |
164 | serves two purposes. | 166 | serves two purposes. |
165 | When it is first called, after the accept BIO has been setup, | 167 | When it is first called, after the accept BIO has been set up, |
166 | it will attempt to create the accept socket and bind an address to it. | 168 | it will attempt to create the accept socket and bind an address to it. |
167 | Second and subsequent calls to | 169 | Second and subsequent calls to |
168 | .Fn BIO_do_accept | 170 | .Fn BIO_do_accept |
169 | will await an incoming connection, or request a retry in non blocking mode. | 171 | will await an incoming connection, or request a retry in non-blocking mode. |
170 | .Sh NOTES | 172 | .Sh NOTES |
171 | When an accept BIO is at the end of a chain, it will await an | 173 | When an accept BIO is at the end of a chain, it will await an |
172 | incoming connection before processing I/O calls. | 174 | incoming 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 |
182 | If any additional BIOs have been set using | 184 | If any additional BIOs have been set using |
183 | .Fn BIO_set_accept_bios , | 185 | .Fn BIO_set_accept_bios , |
184 | then they are placed between the socket and the accept BIO, | 186 | then they are placed between the socket and the accept BIO; |
185 | that is the chain will be accept->otherbios->socket. | 187 | that is, the chain will be accept->otherbios->socket. |
186 | .Pp | 188 | .Pp |
187 | If a server wishes to process multiple connections (as is normally | 189 | If a server wishes to process multiple connections (as is normally |
188 | the case), then the accept BIO must be made available for further | 190 | the case), then the accept BIO must be made available for further |