add initiator flag to handshake

This commit is contained in:
Dmitriy Ryajov 2020-02-24 23:25:56 -06:00
parent d1d133319e
commit f1a297f0f3
2 changed files with 2 additions and 2 deletions

View File

@ -281,7 +281,7 @@ proc transactMessage(conn: Connection,
except AsyncStreamWriteError:
trace "Could not write to connection", conn = $conn
method handshake*(s: Secio, conn: Connection): Future[SecureConn] {.async.} =
method handshake*(s: Secio, conn: Connection, initiator: bool = false): Future[SecureConn] {.async.} =
var
localNonce: array[SecioNonceSize, byte]
remoteNonce: seq[byte]

View File

@ -20,7 +20,7 @@ import secureconn,
type
Secure* = ref object of LPProtocol # base type for secure managers
method handshake(s: Secure, conn: Connection): Future[SecureConn] {.async, base.} =
method handshake(s: Secure, conn: Connection, initiator: bool = true): Future[SecureConn] {.async, base.} =
doAssert(false, "Not implemented!")
proc readLoop(sconn: SecureConn, stream: BufferStream) {.async.} =