summaryrefslogtreecommitdiff
path: root/src/lib/libssl/src/doc/crypto/BIO_s_accept.pod
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/src/doc/crypto/BIO_s_accept.pod')
-rw-r--r--src/lib/libssl/src/doc/crypto/BIO_s_accept.pod31
1 files changed, 21 insertions, 10 deletions
diff --git a/src/lib/libssl/src/doc/crypto/BIO_s_accept.pod b/src/lib/libssl/src/doc/crypto/BIO_s_accept.pod
index c49da7fb02..55e4b730b9 100644
--- a/src/lib/libssl/src/doc/crypto/BIO_s_accept.pod
+++ b/src/lib/libssl/src/doc/crypto/BIO_s_accept.pod
@@ -10,31 +10,31 @@ BIO_get_bind_mode, BIO_do_accept - accept BIO
10 10
11 #include <openssl/bio.h> 11 #include <openssl/bio.h>
12 12
13 BIO_METHOD * BIO_s_accept(void); 13 BIO_METHOD *BIO_s_accept(void);
14 14
15 #define BIO_set_accept_port(b,name) BIO_ctrl(b,BIO_C_SET_ACCEPT,0,(char *)name) 15 long BIO_set_accept_port(BIO *b, char *name);
16 #define BIO_get_accept_port(b) BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,0) 16 char *BIO_get_accept_port(BIO *b);
17 17
18 BIO *BIO_new_accept(char *host_port); 18 BIO *BIO_new_accept(char *host_port);
19 19
20 #define BIO_set_nbio_accept(b,n) BIO_ctrl(b,BIO_C_SET_ACCEPT,1,(n)?"a":NULL) 20 long BIO_set_nbio_accept(BIO *b, int n);
21 #define BIO_set_accept_bios(b,bio) BIO_ctrl(b,BIO_C_SET_ACCEPT,2,(char *)bio) 21 long BIO_set_accept_bios(BIO *b, char *bio);
22 22
23 #define BIO_set_bind_mode(b,mode) BIO_ctrl(b,BIO_C_SET_BIND_MODE,mode,NULL) 23 long BIO_set_bind_mode(BIO *b, long mode);
24 #define BIO_get_bind_mode(b,mode) BIO_ctrl(b,BIO_C_GET_BIND_MODE,0,NULL) 24 long BIO_get_bind_mode(BIO *b, long dummy);
25 25
26 #define BIO_BIND_NORMAL 0 26 #define BIO_BIND_NORMAL 0
27 #define BIO_BIND_REUSEADDR_IF_UNUSED 1 27 #define BIO_BIND_REUSEADDR_IF_UNUSED 1
28 #define BIO_BIND_REUSEADDR 2 28 #define BIO_BIND_REUSEADDR 2
29 29
30 #define BIO_do_accept(b) BIO_do_handshake(b) 30 int BIO_do_accept(BIO *b);
31 31
32=head1 DESCRIPTION 32=head1 DESCRIPTION
33 33
34BIO_s_accept() returns the accept BIO method. This is a wrapper 34BIO_s_accept() returns the accept BIO method. This is a wrapper
35round the platform's TCP/IP socket accept routines. 35round the platform's TCP/IP socket accept routines.
36 36
37Using accept BIOs TCP/IP connections can be accepted and data 37Using accept BIOs, TCP/IP connections can be accepted and data
38transferred using only BIO routines. In this way any platform 38transferred using only BIO routines. In this way any platform
39specific operations are hidden by the BIO abstraction. 39specific operations are hidden by the BIO abstraction.
40 40
@@ -92,7 +92,7 @@ BIO_do_accept() serves two functions. When it is first
92called, after the accept BIO has been setup, it will attempt 92called, after the accept BIO has been setup, it will attempt
93to create the accept socket and bind an address to it. Second 93to create the accept socket and bind an address to it. Second
94and subsequent calls to BIO_do_accept() will await an incoming 94and subsequent calls to BIO_do_accept() will await an incoming
95connection. 95connection, or request a retry in non blocking mode.
96 96
97=head1 NOTES 97=head1 NOTES
98 98
@@ -130,6 +130,17 @@ however because the accept BIO will still accept additional incoming
130connections. This can be resolved by using BIO_pop() (see above) 130connections. This can be resolved by using BIO_pop() (see above)
131and freeing up the accept BIO after the initial connection. 131and freeing up the accept BIO after the initial connection.
132 132
133If the underlying accept socket is non-blocking and BIO_do_accept() is
134called to await an incoming connection it is possible for
135BIO_should_io_special() with the reason BIO_RR_ACCEPT. If this happens
136then it is an indication that an accept attempt would block: the application
137should take appropriate action to wait until the underlying socket has
138accepted a connection and retry the call.
139
140BIO_set_accept_port(), BIO_get_accept_port(), BIO_set_nbio_accept(),
141BIO_set_accept_bios(), BIO_set_bind_mode(), BIO_get_bind_mode() and
142BIO_do_accept() are macros.
143
133=head1 RETURN VALUES 144=head1 RETURN VALUES
134 145
135TBA 146TBA