libp2p/dialer

    Dark Mode
Search:
Group by:
  Source   Edit

Types

Dialer = ref object of Dial
  localPeerId*: PeerId
  connManager: ConnManager
  dialLock: Table[PeerId, AsyncLock]
  transports: seq[Transport]
  peerStore: PeerStore
  nameResolver: NameResolver
  Source   Edit
DialFailedError = object of LPError
  Source   Edit

Procs

proc new(T: type Dialer; localPeerId: PeerId; connManager: ConnManager;
         peerStore: PeerStore; transports: seq[Transport];
         nameResolver: NameResolver = nil): Dialer
  Source   Edit

Methods

method addTransport(self: Dialer; t: Transport) {....raises: [], tags: [].}
  Source   Edit
method connect(self: Dialer; address: MultiAddress; allowUnknownPeerId = false): InternalRaisesFuture[
    PeerId, (CancelledError, LPError)] {.stackTrace: false, ...raises: [], gcsafe,
    tags: [RootEffect].}
Connects to a peer and retrieve its PeerId   Source   Edit
method connect(self: Dialer; peerId: PeerId; addrs: seq[MultiAddress];
               forceDial = false; reuseConnection = true; dir = Direction.Out): InternalRaisesFuture[
    void, (CancelledError, LPError)] {.stackTrace: false, ...raises: [], gcsafe,
                                       tags: [RootEffect].}
connect remote peer without negotiating a protocol   Source   Edit
method tryDial(self: Dialer; peerId: PeerId; addrs: seq[MultiAddress]): Future[
    Opt[MultiAddress]] {.stackTrace: false, ...raises: [], gcsafe,
                         tags: [RootEffect].}
Create a protocol stream in order to check if a connection is possible. Doesn't use the Connection Manager to save it.   Source   Edit