libp2p/transports/transport

Search:
Group by:
Source   Edit  

Types

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

Procs

proc dial(self: Transport; address: MultiAddress;
          peerId: Opt[PeerId] = Opt.none(PeerId)): Future[RawConn] {....gcsafe,
    raises: [], tags: [RootEffect], forbids: [].}
Source   Edit  
proc initialize(self: Transport) {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc newTransportClosedError(parent: ref Exception = nil): ref TransportError {.
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc toTransportAddress(self: Transport; addrsMa: seq[MultiAddress]): Result[
    seq[TransportAddress], string] {....raises: [], tags: [RootEffect], forbids: [].}
Source   Edit  

Methods

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

Templates

template safeClose(stream: untyped) {..}
Source   Edit  
template safeCloseWait(stream: untyped) {..}
Source   Edit