Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connection: more docs for rustls_connection_is_handshaking #430

Merged
merged 1 commit into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,13 @@ impl rustls_connection {
}
}

/// Returns true if the connection is currently performing the TLS handshake.
///
/// Note: This may return `false` while there are still handshake packets waiting
/// to be extracted and transmitted with `rustls_connection_write_tls()`.
///
/// See the rustls documentation for more information.
///
/// <https://docs.rs/rustls/latest/rustls/struct.CommonState.html#method.is_handshaking>
#[no_mangle]
pub extern "C" fn rustls_connection_is_handshaking(conn: *const rustls_connection) -> bool {
Expand Down
7 changes: 7 additions & 0 deletions src/rustls.h
Original file line number Diff line number Diff line change
Expand Up @@ -1508,6 +1508,13 @@ bool rustls_connection_wants_read(const struct rustls_connection *conn);
bool rustls_connection_wants_write(const struct rustls_connection *conn);

/**
* Returns true if the connection is currently performing the TLS handshake.
*
* Note: This may return `false` while there are still handshake packets waiting
* to be extracted and transmitted with `rustls_connection_write_tls()`.
*
* See the rustls documentation for more information.
*
* <https://docs.rs/rustls/latest/rustls/struct.CommonState.html#method.is_handshaking>
*/
bool rustls_connection_is_handshaking(const struct rustls_connection *conn);
Expand Down