Types
HandlerHolder = ref object protos*: seq[string] protocol*: LPProtocol match*: Matcher openedStreams: CountTable[PeerId]
- 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; 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 addHandler[E](m: MultistreamSelect; codec: string; handler: LPProtoHandler | proc (conn: Connection; proto: string): InternalRaisesFuture[void, E]; matcher: Matcher = nil) {....raises: [].}
- helper to allow registering pure handlers Source Edit
proc handle(_: type MultistreamSelect; conn: Connection; protos: seq[string]; matchers = newSeq[Matcher](); active: bool = false): InternalRaisesFuture[ string, (CancelledError, LPStreamError, MultiStreamError)] {. stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [].}
- Source Edit
proc handle(m: MultistreamSelect; conn: Connection; active: bool = false): InternalRaisesFuture[ void, (CancelledError,)] {.stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
- Source Edit
proc list(m: MultistreamSelect; conn: Connection): InternalRaisesFuture[ seq[string], (CancelledError, LPStreamError, MultiStreamError)] {. 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): InternalRaisesFuture[void, (CancelledError,)] {. stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
- Source Edit
proc stop(m: MultistreamSelect): InternalRaisesFuture[void, void] {. stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
- Source Edit