Nim-LibP2P Copyright (c) 2019 Status Research & Development GmbH
- Licensed under either of
- Apache License, version 2.0, (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option. This file may not be copied, modified, or distributed except according to those terms.
Types
Secure = ref object of LPProtocol
- Source Edit
SecureConn = ref object of Connection stream*: Connection buf: StreamSeq
- Source Edit
Consts
SecureConnTrackerName = "SecureConn"
- Source Edit
Procs
proc new(T: type SecureConn; conn: Connection; peerId: PeerId; observedAddr: MultiAddress; timeout: Duration = DefaultConnectionTimeout): T:type {. ...raises: [Defect].}
- Source Edit
func shortLog(conn: SecureConn): auto {....raises: [Defect], tags: [].}
- Source Edit
Methods
method closeImpl(s: SecureConn): Future[void] {.stackTrace: false, ...gcsafe, raises: [Defect], tags: [RootEffect].}
- Source Edit
method handshake(s: Secure; conn: Connection; initiator: bool): Future[ SecureConn] {.base, stackTrace: false, ...gcsafe, raises: [Defect], tags: [RootEffect].}
- Source Edit
method initStream(s: SecureConn) {....raises: [Defect], tags: [TimeEffect, RootEffect].}
- Source Edit
method readMessage(c: SecureConn): Future[seq[byte]] {.base, stackTrace: false, ...gcsafe, raises: [Defect], tags: [RootEffect].}
- Source Edit
method readOnce(s: SecureConn; pbytes: pointer; nbytes: int): Future[int] {. stackTrace: false, ...gcsafe, raises: [Defect], tags: [RootEffect].}
- Source Edit
method secure(s: Secure; conn: Connection; initiator: bool): Future[Connection] {. base, ...raises: [Defect], tags: [RootEffect].}
- Source Edit
Templates
template formatItIMPL(it: SecureConn): auto
- Source Edit