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 dial(self: Dialer; peerId: PeerId; addrs: seq[MultiAddress];
            protos: seq[string]; forceDial = false): InternalRaisesFuture[
    Connection, (CancelledError, LPError)] {.stackTrace: false, ...raises: [],
    gcsafe, tags: [RootEffect].}
create a protocol stream and establish a connection if one doesn't exist already   Source   Edit
method dial(self: Dialer; peerId: PeerId; protos: seq[string]): InternalRaisesFuture[
    Connection, (CancelledError, LPError)] {.stackTrace: false, ...raises: [],
    gcsafe, tags: [RootEffect].}
create a protocol stream over an existing connection   Source   Edit
method tryDial(self: Dialer; peerId: PeerId; addrs: seq[MultiAddress]): InternalRaisesFuture[
    Opt[MultiAddress], (CancelledError, LPError)] {.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