libp2p/multistream

    Dark Mode
Search:
Group by:
  Source   Edit

Types

HandlerHolder = ref object
  protos*: seq[string]
  protocol*: LPProtocol
  match*: Matcher
  openedStreams: CountTable[PeerId]
  Source   Edit
Matcher = proc (proto: string): bool {....gcsafe, raises: [].}
  Source   Edit
MultiStreamError = object of LPError
  Source   Edit
MultistreamSelect = ref object of RootObj
  handlers*: seq[HandlerHolder]
  codec*: string
  Source   Edit

Procs

proc addHandler(m: MultistreamSelect; codec: string; handler: LPProtoHandler;
                matcher: Matcher = nil) {....raises: [], tags: [].}
helper to allow registering pure handlers   Source   Edit
proc addHandler(m: MultistreamSelect; codec: string; protocol: LPProtocol;
                matcher: Matcher = nil) {....raises: [], tags: [RootEffect].}
  Source   Edit
proc addHandler(m: MultistreamSelect; codecs: seq[string]; protocol: LPProtocol;
                matcher: Matcher = nil) {....raises: [], tags: [].}
  Source   Edit
proc handle(_: type MultistreamSelect; conn: Connection; protos: seq[string];
            matchers = newSeq[Matcher](); active: bool = false): Future[string] {.
    stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [].}
  Source   Edit
proc handle(m: MultistreamSelect; conn: Connection; active: bool = false): Future[
    void] {.stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [],
            tags: [RootEffect].}
  Source   Edit
proc list(m: MultistreamSelect; conn: Connection): Future[seq[string]] {.
    stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [],
    tags: [RootEffect].}
list remote protos requests on connection   Source   Edit
proc new(T: typedesc[MultistreamSelect]): T:type {....raises: [].}
  Source   Edit
proc select(_: MultistreamSelect | type MultistreamSelect; conn: Connection;
            proto: seq[string]): InternalRaisesFuture[string,
    (CancelledError, LPStreamError, MultiStreamError)] {.stackTrace: false,
    ...raises: [], gcsafe, raises: [], raises: [].}
  Source   Edit
proc select(_: MultistreamSelect | type MultistreamSelect; conn: Connection;
            proto: string): InternalRaisesFuture[bool,
    (CancelledError, LPStreamError, MultiStreamError)] {.stackTrace: false,
    ...raises: [], gcsafe, raises: [], raises: [].}
  Source   Edit
proc select(m: MultistreamSelect; conn: Connection): InternalRaisesFuture[bool,
    (CancelledError, LPStreamError, MultiStreamError)] {.stackTrace: false,
    ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
  Source   Edit
proc start(m: MultistreamSelect): Future[void] {.stackTrace: false, ...raises: [],
    gcsafe, raises: [], raises: [], tags: [RootEffect].}
  Source   Edit
proc stop(m: MultistreamSelect): Future[void] {.stackTrace: false, ...raises: [],
    gcsafe, raises: [], raises: [], tags: [RootEffect].}
  Source   Edit