Skip to content

Commit 80d93c6

Browse files
committed
connection: more docs for rustls_connection_is_handshaking
Previously the rustls-ffi `rustls_connection_is_handshaking` fn only pointed at the upstream Rustls documentation. This commit adds a bit of the detail present there, customizing it for rustls-ffi (e.g. by ref'ing `rustls_connection_write_tls()`).
1 parent 8a137f8 commit 80d93c6

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/connection.rs

+7
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,13 @@ impl rustls_connection {
277277
}
278278
}
279279

280+
/// Returns true if the connection is currently performing the TLS handshake.
281+
///
282+
/// Note: This may return `false` while there are still handshake packets waiting
283+
/// to be extracted and transmitted with `rustls_connection_write_tls()`.
284+
///
285+
/// See the rustls documentation for more information.
286+
///
280287
/// <https://docs.rs/rustls/latest/rustls/struct.CommonState.html#method.is_handshaking>
281288
#[no_mangle]
282289
pub extern "C" fn rustls_connection_is_handshaking(conn: *const rustls_connection) -> bool {

src/rustls.h

+7
Original file line numberDiff line numberDiff line change
@@ -1508,6 +1508,13 @@ bool rustls_connection_wants_read(const struct rustls_connection *conn);
15081508
bool rustls_connection_wants_write(const struct rustls_connection *conn);
15091509

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

0 commit comments

Comments
 (0)