Skip to content

Commit

Permalink
ffi: add quiche_conn_is_resumed
Browse files Browse the repository at this point in the history
Motivation:

Connection.is_resumed() is not exposed via FFI / C.

Modifications:

Add quiche_conn_is_resumed

Result:

Missing API added
  • Loading branch information
normanmaurer authored Dec 5, 2023
1 parent b0944d8 commit ec6d017
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions quiche/include/quiche.h
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,9 @@ void quiche_conn_session(const quiche_conn *conn, const uint8_t **out, size_t *o
// Returns true if the connection handshake is complete.
bool quiche_conn_is_established(const quiche_conn *conn);

// Returns true if the connection is resumed.
bool quiche_conn_is_resumed(const quiche_conn *conn);

// Returns true if the connection has a pending handshake that has progressed
// enough to send or receive early data.
bool quiche_conn_is_in_early_data(const quiche_conn *conn);
Expand Down
5 changes: 5 additions & 0 deletions quiche/src/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1079,6 +1079,11 @@ pub extern fn quiche_conn_is_established(conn: &Connection) -> bool {
conn.is_established()
}

#[no_mangle]
pub extern fn quiche_conn_is_resumed(conn: &Connection) -> bool {
conn.is_resumed()
}

#[no_mangle]
pub extern fn quiche_conn_is_in_early_data(conn: &Connection) -> bool {
conn.is_in_early_data()
Expand Down

0 comments on commit ec6d017

Please sign in to comment.