Skip to content

Commit

Permalink
Add some additional comments to the demos
Browse files Browse the repository at this point in the history
Add some additional explanation for some code lines in the demos that did
not have a comment.
  • Loading branch information
mattcaswell committed Aug 17, 2023
1 parent f79c806 commit d5a85b4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions demos/guide/quic-client-block.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,13 @@ int main(void)
goto end;
}

/* Set the IP address of the remote peer */
if (!SSL_set_initial_peer_addr(ssl, peer_addr)) {
printf("Failed to set the initial peer address\n");
goto end;
}

/* Connect to the server and perform the TLS handshake */
if ((ret = SSL_connect(ssl)) < 1) {
/*
* If the failure is due to a verification error we can get more
Expand Down
2 changes: 2 additions & 0 deletions demos/guide/quic-multi-stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,13 @@ int main(void)
goto end;
}

/* Set the IP address of the remote peer */
if (!SSL_set_initial_peer_addr(ssl, peer_addr)) {
printf("Failed to set the initial peer address\n");
goto end;
}

/* Connect to the server and perform the TLS handshake */
if ((ret = SSL_connect(ssl)) < 1) {
/*
* If the failure is due to a verification error we can get more
Expand Down
1 change: 1 addition & 0 deletions doc/man7/ossl-guide-quic-client-block.pod
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ is being connected to. In L</Creating the socket and BIO> above we saved that
address away for future use. Now we need to use it via the
L<SSL_set_initial_peer_addr(3)> function.

/* Set the IP address of the remote peer */
if (!SSL_set_initial_peer_addr(ssl, peer_addr)) {
printf("Failed to set the initial peer address\n");
goto end;
Expand Down

0 comments on commit d5a85b4

Please sign in to comment.