libp2p/transports/transport

    Dark Mode
Search:
Group by:
  Source   Edit

Types

Transport = ref object of RootObj
  addrs*: seq[MultiAddress]
  running*: bool
  upgrader*: Upgrade
  networkReachability*: NetworkReachability
  Source   Edit
TransportError = object of LPError
  Source   Edit

Procs

proc dial(self: Transport; address: MultiAddress;
          peerId: Opt[PeerId] = Opt.none(PeerId)): InternalRaisesFuture[
    Connection, (CancelledError, LPError)] {.stackTrace: false, ...raises: [],
    gcsafe, raises: [], raises: [], tags: [RootEffect].}
  Source   Edit

Methods

method accept(self: Transport): InternalRaisesFuture[Connection,
    (CancelledError, LPError)] {.base, stackTrace: false, ...raises: [], gcsafe,
                                 raises: [], raises: [], tags: [RootEffect].}
accept incoming connections   Source   Edit
method dial(self: Transport; hostname: string; address: MultiAddress;
            peerId: Opt[PeerId] = Opt.none(PeerId)): InternalRaisesFuture[
    Connection, (CancelledError, LPError)] {.base, stackTrace: false,
    ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
dial a peer   Source   Edit
method handles(self: Transport; address: MultiAddress): bool {.base, ...gcsafe,
    raises: [], tags: [].}
check if transport supports the multiaddress   Source   Edit
method start(self: Transport; addrs: seq[MultiAddress]): InternalRaisesFuture[
    void, (CancelledError, LPError)] {.base, stackTrace: false, ...raises: [],
                                       gcsafe, raises: [], raises: [],
                                       tags: [RootEffect].}
start the transport   Source   Edit
method stop(self: Transport): InternalRaisesFuture[void, void] {.base,
    stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [],
    tags: [RootEffect].}
stop and cleanup the transport including all outstanding connections   Source   Edit
method upgrade(self: Transport; conn: Connection; peerId: Opt[PeerId]): Future[
    Muxer] {.base, ...gcsafe, raises: [], tags: [].}
base upgrade method that the transport uses to perform transport specific upgrades   Source   Edit