libp2p/muxers/yamux/yamux

    Dark Mode
Search:
Group by:
  Source   Edit

Types

Yamux = ref object of Muxer
  channels: Table[uint32, YamuxChannel]
  flushed: Table[uint32, int]
  currentId: uint32
  isClosed: bool
  maxChannCount: int
  Source   Edit
YamuxChannel = ref object of Connection
  id: uint32
  recvWindow: int
  sendWindow: int
  maxRecvWindow: int
  conn: Connection
  isSrc: bool
  opened: bool
  isSending: bool
  sendQueue: seq[ToSend]
  recvQueue: seq[byte]
  isReset: bool
  closedRemotely: Future[void]
  closedLocally: bool
  receivedData: AsyncEvent
  returnedEof: bool
  Source   Edit
YamuxError = object of CatchableError
  Source   Edit

Consts

YamuxCodec = "/yamux/1.0.0"
  Source   Edit

Procs

proc new(T: type[Yamux]; conn: Connection; maxChannCount: int = MaxChannelCount): T:type {.
    ...raises: [].}
  Source   Edit
proc open(channel: YamuxChannel): Future[void] {....gcsafe, stackTrace: false,
    ...gcsafe, raises: [], raises: [], tags: [RootEffect].}
  Source   Edit
proc setMaxRecvWindow(channel: YamuxChannel; maxRecvWindow: int) {....raises: [],
    tags: [].}
  Source   Edit

Methods

method closeImpl(channel: YamuxChannel): Future[void] {....gcsafe,
    stackTrace: false, ...gcsafe, raises: [], raises: [], tags: [RootEffect].}
  Source   Edit
method closeX(m: Yamux; info: tuple[filename: string, line: int, column: int]): Future[
    void] {.stackTrace: false, ...gcsafe, raises: [], raises: [],
            tags: [RootEffect].}
  Source   Edit
method handleX(m: Yamux; info: tuple[filename: string, line: int, column: int]): Future[
    void] {....gcsafe, stackTrace: false, ...gcsafe, raises: [], raises: [],
            tags: [RootEffect].}
  Source   Edit
method newStream(m: Yamux; name: string = ""; lazy: bool = false): Future[
    Connection] {....gcsafe, stackTrace: false, ...gcsafe, raises: [], raises: [],
                  tags: [RootEffect].}
  Source   Edit
method readOnceX(channel: YamuxChannel; pbytes: pointer; nbytes: int;
                 info: tuple[filename: string, line: int, column: int]): Future[
    int] {.stackTrace: false, ...gcsafe, raises: [], raises: [], tags: [RootEffect].}
  Source   Edit
method writeX(channel: YamuxChannel; msg: seq[byte];
              info: tuple[filename: string, line: int, column: int]): Future[
    void] {....raises: [], tags: [RootEffect].}
  Source   Edit

Templates

template close(s: Yamux): untyped
  Source   Edit
template handle(m: Muxer): untyped
  Source   Edit
template readOnce(s: YamuxChannel; pbytes: pointer; nbytes: int): untyped
  Source   Edit
template write(s: YamuxChannel; msg: seq[byte]): untyped
  Source   Edit