TCP transport implementation
Types
TcpTransport = ref object of Transport servers*: seq[StreamServer] clients: array[Direction, seq[StreamTransport]] flags: set[ServerFlags] acceptFuts: seq[Future[StreamTransport]]
- 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; dir: Direction): Future[ Connection] {.stackTrace: false, ...gcsafe, raises: [], raises: [], tags: [RootEffect].}
- Source Edit
proc new(T: typedesc[TcpTransport]; flags: set[ServerFlags] = {}; upgrade: Upgrade): T:type {.public, ...raises: [].}
- Source Edit
Methods
method accept(self: TcpTransport): Future[Connection] {....gcsafe, stackTrace: false, ...gcsafe, raises: [], raises: [], tags: [RootEffect].}
- accept a new TCP connection Source Edit
method dial(self: TcpTransport; hostname: string; address: MultiAddress): Future[ Connection] {....gcsafe, stackTrace: false, ...gcsafe, 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: [], tags: [RootEffect].}
- listen on the transport Source Edit
method stop(self: TcpTransport): Future[void] {....gcsafe, stackTrace: false, ...gcsafe, raises: [], raises: [], tags: [RootEffect].}
- stop the transport Source Edit