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): Future[
    PeerId] {.stackTrace: false, ...gcsafe, raises: [], 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): Future[
    void] {.stackTrace: false, ...gcsafe, raises: [], 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): Future[Connection] {.
    stackTrace: false, ...gcsafe, raises: [], 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]): Future[
    Connection] {.stackTrace: false, ...gcsafe, raises: [], tags: [RootEffect].}
create a protocol stream over an existing connection   Source   Edit
method tryDial(self: Dialer; peerId: PeerId; addrs: seq[MultiAddress]): Future[
    Opt[MultiAddress]] {.stackTrace: false, ...gcsafe, raises: [],
                         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