diff --git a/quiche/include/quiche.h b/quiche/include/quiche.h index 014150d9aa..c518705860 100644 --- a/quiche/include/quiche.h +++ b/quiche/include/quiche.h @@ -402,17 +402,17 @@ void quiche_conn_peer_cert(quiche_conn *conn, const uint8_t **out, size_t *out_l void quiche_conn_session(quiche_conn *conn, const uint8_t **out, size_t *out_len); // Returns true if the connection handshake is complete. -bool quiche_conn_is_established(quiche_conn *conn); +bool quiche_conn_is_established(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(quiche_conn *conn); +bool quiche_conn_is_in_early_data(const quiche_conn *conn); // Returns whether there is stream or DATAGRAM data available to read. -bool quiche_conn_is_readable(quiche_conn *conn); +bool quiche_conn_is_readable(const quiche_conn *conn); // Returns true if the connection is draining. -bool quiche_conn_is_draining(quiche_conn *conn); +bool quiche_conn_is_draining(const quiche_conn *conn); // Returns the number of bidirectional streams that can be created // before the peer's stream count limit is reached. @@ -423,10 +423,10 @@ uint64_t quiche_conn_peer_streams_left_bidi(quiche_conn *conn); uint64_t quiche_conn_peer_streams_left_uni(quiche_conn *conn); // Returns true if the connection is closed. -bool quiche_conn_is_closed(quiche_conn *conn); +bool quiche_conn_is_closed(const quiche_conn *conn); // Returns true if the connection was closed due to the idle timeout. -bool quiche_conn_is_timed_out(quiche_conn *conn); +bool quiche_conn_is_timed_out(const quiche_conn *conn); // Returns true if a connection error was received, and updates the provided // parameters accordingly. diff --git a/quiche/src/ffi.rs b/quiche/src/ffi.rs index 4418974b34..784fa7ecb3 100644 --- a/quiche/src/ffi.rs +++ b/quiche/src/ffi.rs @@ -987,27 +987,27 @@ pub extern fn quiche_conn_session( } #[no_mangle] -pub extern fn quiche_conn_is_established(conn: &mut Connection) -> bool { +pub extern fn quiche_conn_is_established(conn: &Connection) -> bool { conn.is_established() } #[no_mangle] -pub extern fn quiche_conn_is_in_early_data(conn: &mut Connection) -> bool { +pub extern fn quiche_conn_is_in_early_data(conn: &Connection) -> bool { conn.is_in_early_data() } #[no_mangle] -pub extern fn quiche_conn_is_draining(conn: &mut Connection) -> bool { +pub extern fn quiche_conn_is_draining(conn: &Connection) -> bool { conn.is_draining() } #[no_mangle] -pub extern fn quiche_conn_is_closed(conn: &mut Connection) -> bool { +pub extern fn quiche_conn_is_closed(conn: &Connection) -> bool { conn.is_closed() } #[no_mangle] -pub extern fn quiche_conn_is_timed_out(conn: &mut Connection) -> bool { +pub extern fn quiche_conn_is_timed_out(conn: &Connection) -> bool { conn.is_timed_out() }