TCP transport implementation
Types
TcpTransport = ref object of Transport servers*: seq[StreamServer] clients: array[Direction, seq[StreamTransport]] flags: set[ServerFlags] clientFlags: set[SocketFlags] acceptFuts: seq[Future[StreamTransport]] connectionsTimeout: Duration
- Source Edit
TcpTransportError = object of transport.TransportError
- Source Edit
TcpTransportTracker = ref object of TrackerBase opened*: uint64 closed*: uint64
- Source Edit
Consts
TcpTransportTrackerName = "libp2p.tcptransport"
- Source Edit
Procs
proc connHandler(self: TcpTransport; client: StreamTransport; observedAddr: Opt[MultiAddress]; dir: Direction): Future[ Connection] {.stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], tags: [RootEffect].}
- Source Edit
proc new(T: typedesc[TcpTransport]; flags: set[ServerFlags] = {}; upgrade: Upgrade; connectionsTimeout = 10.minutes): T:type {.public, ...raises: [].}
- Source Edit
Methods
method dial(self: TcpTransport; hostname: string; address: MultiAddress; peerId: Opt[PeerId] = Opt.none(PeerId)): Future[Connection] {. stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], tags: [RootEffect].}
- dial a peer Source Edit
method handles(t: TcpTransport; address: MultiAddress): bool {....gcsafe, raises: [], tags: [].}
- Source Edit
method start(self: TcpTransport; addrs: seq[MultiAddress]): Future[void] {. stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], tags: [RootEffect].}
- listen on the transport Source Edit
method stop(self: TcpTransport): Future[void] {.stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], tags: [RootEffect].}
- stop the transport Source Edit