mirror of https://github.com/vacp2p/nim-libp2p.git
add initiator flag to handshake
This commit is contained in:
parent
d1d133319e
commit
f1a297f0f3
|
@ -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]
|
||||
|
|
|
@ -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.} =
|
||||
|
|
Loading…
Reference in New Issue