summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Brown <nbrown.us@gmail.com>2018-03-08 12:40:28 -0800
committerJonathan Rudenberg <jonathan@titanous.com>2018-03-08 15:40:28 -0500
commit953535c65f34da6d55db0662060775684af475e1 (patch)
tree86e0b12f4579f89ab457f44b4688a4c041ac5c0e
parent01638cb52dafe42224b938fb517721f984c03100 (diff)
downloadnoise-953535c65f34da6d55db0662060775684af475e1.tar.xz
Add a getter for handshake msgIdx (#27)
-rw-r--r--state.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/state.go b/state.go
index 8b7b9ba..723b368 100644
--- a/state.go
+++ b/state.go
@@ -490,3 +490,8 @@ func (s *HandshakeState) ChannelBinding() []byte {
func (s *HandshakeState) PeerStatic() []byte {
return s.rs
}
+
+// MessageIndex returns the current handshake message id
+func (s *HandshakeState) MessageIndex() int {
+ return s.msgIdx
+}