Lines Matching +full:if +full:- +full:mode +full:- +full:en

1 .\" -*- mode: troff; coding: utf-8 -*-
33 .\" If the F register is >0, we'll generate index entries on stderr for
44 . if \nF \{\
48 . if !\nF==2 \{\
57 .IX Title "OSSL-GUIDE-QUIC-CLIENT-BLOCK 7ossl"
58 .TH OSSL-GUIDE-QUIC-CLIENT-BLOCK 7ossl 2025-09-30 3.5.4 OpenSSL
64 ossl\-guide\-quic\-client\-block
65 \&\- OpenSSL Guide: Writing a simple blocking QUIC client
71 QUIC is non-standard and will not be supported by real world servers. This is
76 (see \fBossl\-guide\-libraries\-introduction\fR\|(7), \fBossl\-guide\-tls\-introduction\fR\|(7)
77 and \fBossl\-guide\-quic\-introduction\fR\|(7)); and that you know how to
82 \&\fBossl\-guide\-tls\-client\-block\fR\|(7). Only the differences between that client and
87 tutorial will discuss how to write a multi-stream client (see
88 \&\fBossl\-guide\-quic\-multi\-stream\fR\|(7)).
92 \&\f(CW\*(C`quic\-client\-block.c\*(C'\fR. It is also available online at
93 <https://github.com/openssl/openssl/blob/master/demos/guide/quic\-client\-block.c>.
96 In the TLS tutorial (\fBossl\-guide\-tls\-client\-block\fR\|(7)) we created an \fBSSL_CTX\fR
110 mode", see \fBossl\-guide\-quic\-introduction\fR\|(7)). For this tutorial we will be
112 connection idle in our application and so thread assisted mode is not needed.
121 \& if (ctx == NULL) {
122 \& printf("Failed to create the SSL_CTX\en");
149 \& if (!BIO_lookup_ex(hostname, port, BIO_LOOKUP_CLIENT, family, SOCK_DGRAM, 0,
159 \& * Create a TCP socket. We could equally use non\-OpenSSL calls such
166 \& if (sock == \-1)
170 \& if (!BIO_connect(sock, BIO_ADDRINFO_address(ai), 0)) {
172 \& sock = \-1;
176 \& /* Set to nonblocking mode */
177 \& if (!BIO_socket_nbio(sock, 1)) {
179 \& sock = \-1;
186 \& if (sock != \-1) {
188 \& if (*peer_addr == NULL) {
201 Firstly, we set the socket into nonblocking mode. This must always be done for
204 have blocking behaviour. See \fBossl\-guide\-quic\-introduction\fR\|(7) for further
224 \& if (bio == NULL) {
250 ALPN (Application-Layer Protocol Negotiation) is a feature of TLS that enables
252 For example, if you intend to use HTTP/3 over the connection then the ALPN value
254 <https://www.iana.org/assignments/tls\-extensiontype\-values/tls\-extensiontype\-values.xml#alpn\-p…
257 simple client that we developed in \fBossl\-guide\-tls\-client\-block\fR\|(7) did not use
265 \& if (SSL_set_alpn_protos(ssl, alpn, sizeof(alpn)) != 0) {
266 \& printf("Failed to set the ALPN for the connection\en");
284 \& if (!SSL_set1_initial_peer_addr(ssl, peer_addr)) {
285 \& printf("Failed to set the initial peer address\en");
318 \& if (!SSL_write_ex(ssl, request_start, strlen(request_start), &written)) {
319 \& printf("Failed to write start of HTTP request\en");
322 \& if (!SSL_write_ex(ssl, hostname, strlen(hostname), &written)) {
323 \& printf("Failed to write hostname in HTTP request\en");
326 \& if (!SSL_write_ex2(ssl, request_end, strlen(request_end),
328 \& printf("Failed to write end of HTTP request\en");
344 \& * number of bytes that we read. The data could be non\-printable or
351 \& printf("\en");
369 \& * reset \- or some failure occurred on the underlying connection.
373 \& printf("Stream reset occurred\en");
378 \& printf("Connection closed\en");
383 \& printf("Unknown stream failure\en");
390 \& printf ("Failed reading remaining data\en");
397 stream has been reset, or if some other fatal error has occurred.
427 \& if (ret < 0) {
428 \& printf("Error shutting down: %d\en", ret);
447 See \fBossl\-guide\-quic\-multi\-stream\fR\|(7) to read a tutorial on how to modify the
451 \&\fBossl\-guide\-introduction\fR\|(7), \fBossl\-guide\-libraries\-introduction\fR\|(7),
452 \&\fBossl\-guide\-libssl\-introduction\fR\|(7), \fBossl\-guide\-tls\-introduction\fR\|(7),
453 \&\fBossl\-guide\-tls\-client\-block\fR\|(7), \fBossl\-guide\-quic\-introduction\fR\|(7)
456 Copyright 2023\-2025 The OpenSSL Project Authors. All Rights Reserved.