Skip to content

Commit 658f122

Browse files
dastansamMathJud
authored andcommitted
Update handshakestate.rs
1 parent 1f9c642 commit 658f122

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

noise-protocol/src/handshakestate.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,16 @@ where
432432
pub fn get_pattern(&self) -> &HandshakePattern {
433433
&self.pattern
434434
}
435+
436+
/// Get the message index of this [`HandshakeState`].
437+
pub fn get_index(&self) -> usize {
438+
self.message_index
439+
}
440+
441+
/// Set the message index of this [`HandshakeState`] manually.
442+
pub fn set_index(&mut self, index: usize) {
443+
self.message_index = index;
444+
}
435445

436446
/// Check whether it is our turn to send in the handshake state.
437447
pub fn is_write_turn(&self) -> bool {

0 commit comments

Comments
 (0)