summaryrefslogtreecommitdiffstats
path: root/upstream/debian-unstable/man3/BIO_s_connect.3ssl
diff options
context:
space:
mode:
Diffstat (limited to 'upstream/debian-unstable/man3/BIO_s_connect.3ssl')
-rw-r--r--upstream/debian-unstable/man3/BIO_s_connect.3ssl32
1 files changed, 29 insertions, 3 deletions
diff --git a/upstream/debian-unstable/man3/BIO_s_connect.3ssl b/upstream/debian-unstable/man3/BIO_s_connect.3ssl
index 28430749..caf291d2 100644
--- a/upstream/debian-unstable/man3/BIO_s_connect.3ssl
+++ b/upstream/debian-unstable/man3/BIO_s_connect.3ssl
@@ -55,7 +55,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_S_CONNECT 3SSL"
-.TH BIO_S_CONNECT 3SSL 2024-02-03 3.1.5 OpenSSL
+.TH BIO_S_CONNECT 3SSL 2024-04-04 3.2.2-dev OpenSSL
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -66,7 +66,8 @@ BIO_set_conn_hostname, BIO_set_conn_port,
BIO_set_conn_address, BIO_set_conn_ip_family,
BIO_get_conn_hostname, BIO_get_conn_port,
BIO_get_conn_address, BIO_get_conn_ip_family,
-BIO_set_nbio, BIO_do_connect \- connect BIO
+BIO_set_nbio, BIO_set_sock_type, BIO_get_sock_type, BIO_get0_dgram_bio,
+BIO_do_connect \- connect BIO
.SH SYNOPSIS
.IX Header "SYNOPSIS"
.Vb 1
@@ -87,6 +88,10 @@ BIO_set_nbio, BIO_do_connect \- connect BIO
\&
\& long BIO_set_nbio(BIO *b, long n);
\&
+\& int BIO_set_sock_type(BIO *b, int sock_type);
+\& int BIO_get_sock_type(BIO *b);
+\& int BIO_get0_dgram_bio(BIO *B, BIO **dgram_bio);
+\&
\& long BIO_do_connect(BIO *b);
.Ve
.SH DESCRIPTION
@@ -103,7 +108,7 @@ on the underlying connection. If no connection is established
and the port and hostname (see below) is set up properly then
a connection is established first.
.PP
-Connect BIOs support \fBBIO_puts()\fR but not \fBBIO_gets()\fR.
+Connect BIOs support \fBBIO_puts()\fR and \fBBIO_gets()\fR.
.PP
If the close flag is set on a connect BIO then any active
connection is shutdown and the socket closed when the BIO
@@ -159,6 +164,19 @@ A zero or negative value is returned if the connection could not be established.
The call \fBBIO_should_retry()\fR should be used for non blocking connect BIOs
to determine if the call should be retried.
If a connection has already been established this call has no effect.
+.PP
+\&\fBBIO_set_sock_type()\fR can be used to set a socket type value as would be passed in
+a call to \fBsocket\fR\|(2). The only currently supported values are \fBSOCK_STREAM\fR (the
+default) and \fBSOCK_DGRAM\fR. If \fBSOCK_DGRAM\fR is configured, the connection
+created is a UDP datagram socket handled via \fBBIO_s_datagram\fR\|(3).
+I/O calls such as \fBBIO_read\fR\|(3) and \fBBIO_write\fR\|(3) are forwarded transparently
+to an internal \fBBIO_s_datagram\fR\|(3) instance. The created \fBBIO_s_datagram\fR\|(3)
+instance can be retrieved using \fBBIO_get0_dgram_bio()\fR if desired, which writes
+a pointer to the \fBBIO_s_datagram\fR\|(3) instance to \fI*dgram_bio\fR. The lifetime
+of the internal \fBBIO_s_datagram\fR\|(3) is managed by \fBBIO_s_connect()\fR and does not
+need to be freed by the caller.
+.PP
+\&\fBBIO_get_sock_type()\fR retrieves the value set using \fBBIO_set_sock_type()\fR.
.SH NOTES
.IX Header "NOTES"
If blocking I/O is set then a non positive return value from any
@@ -217,6 +235,12 @@ port or NULL if not set.
.PP
\&\fBBIO_do_connect()\fR returns 1 if the connection was successfully
established and <=0 if the connection failed.
+.PP
+\&\fBBIO_set_sock_type()\fR returns 1 on success or 0 on failure.
+.PP
+\&\fBBIO_get_sock_type()\fR returns a socket type or 0 if the call is not supported.
+.PP
+\&\fBBIO_get0_dgram_bio()\fR returns 1 on success or 0 on failure.
.SH EXAMPLES
.IX Header "EXAMPLES"
This is example connects to a webserver on the local host and attempts
@@ -252,6 +276,8 @@ to retrieve a page and copy the result to standard output.
\&\fBBIO_set_conn_int_port()\fR, \fBBIO_get_conn_int_port()\fR, \fBBIO_set_conn_ip()\fR, and \fBBIO_get_conn_ip()\fR
were removed in OpenSSL 1.1.0.
Use \fBBIO_set_conn_address()\fR and \fBBIO_get_conn_address()\fR instead.
+.PP
+Connect BIOs support \fBBIO_gets()\fR since OpenSSL 3.2.
.SH COPYRIGHT
.IX Header "COPYRIGHT"
Copyright 2000\-2023 The OpenSSL Project Authors. All Rights Reserved.