Length Prefixed stream implementation
Types
InvalidVarintError = object of LPStreamError
- Source Edit
LPStream = ref object of RootObj closeEvent*: AsyncEvent isClosed*: bool isEof*: bool objName*: string oid*: Oid dir*: Direction closedWithEOF: bool
- Source Edit
LPStreamClosedError = object of LPStreamError
- Source Edit
LPStreamEOFError = object of LPStreamError
- Source Edit
LPStreamError = object of LPError
- Source Edit
LPStreamIncompleteError = object of LPStreamError
- Source Edit
LPStreamIncorrectDefect = object of Defect
- Source Edit
LPStreamLimitError = object of LPStreamError
- Source Edit
LPStreamReadError = object of LPStreamError par*: ref CatchableError
- Source Edit
LPStreamWriteError = object of LPStreamError par*: ref CatchableError
- Source Edit
MaxSizeError = object of LPStreamError
- Source Edit
StreamTracker = ref object of TrackerBase opened*: uint64 closed*: uint64
- Source Edit
Procs
proc closeWithEOF(s: LPStream): Future[void] {.public(), stackTrace: false, ...gcsafe, raises: [Defect], raises: [Defect], tags: [RootEffect].}
- Source Edit
proc join(s: LPStream): Future[void] {.public, ...raises: [Defect], tags: [].}
- Wait for the stream to be closed Source Edit
proc newLPStreamClosedError(): ref LPStreamClosedError {....raises: [Defect], tags: [].}
- Source Edit
proc newLPStreamEOFError(): ref LPStreamEOFError {....raises: [Defect], tags: [].}
- Source Edit
proc newLPStreamIncompleteError(): ref LPStreamIncompleteError {. ...raises: [Defect], tags: [].}
- Source Edit
proc newLPStreamIncorrectDefect(m: string): ref LPStreamIncorrectDefect {. ...raises: [Defect], tags: [].}
- Source Edit
proc newLPStreamLimitError(): ref LPStreamLimitError {....raises: [Defect], tags: [].}
- Source Edit
proc newLPStreamReadError(msg: string): ref LPStreamReadError {. ...raises: [Defect], tags: [].}
- Source Edit
proc newLPStreamReadError(p: ref CatchableError): ref LPStreamReadError {. ...raises: [Defect], tags: [].}
- Source Edit
proc newLPStreamWriteError(p: ref CatchableError): ref LPStreamWriteError {. ...raises: [Defect], tags: [].}
- Source Edit
proc readExactly(s: LPStream; pbytes: pointer; nbytes: int): Future[void] {. public(), stackTrace: false, ...gcsafe, raises: [Defect], raises: [Defect], tags: [RootEffect].}
- Source Edit
proc readLine(s: LPStream; limit = 0; sep = "\r\n"): Future[string] {.public(), stackTrace: false, ...gcsafe, raises: [Defect], raises: [Defect], tags: [RootEffect].}
- Source Edit
proc readLp(s: LPStream; maxSize: int): Future[seq[byte]] {....gcsafe, public(), stackTrace: false, ...gcsafe, raises: [Defect], raises: [Defect], tags: [RootEffect].}
- Source Edit
proc readVarint(conn: LPStream): Future[uint64] {....gcsafe, public(), stackTrace: false, ...gcsafe, raises: [Defect], raises: [Defect], tags: [RootEffect].}
- Source Edit
proc write(s: LPStream; msg: string): Future[void] {.public, ...raises: [Defect], tags: [].}
- Source Edit
Methods
method close(s: LPStream): Future[void] {.base, public(), stackTrace: false, ...gcsafe, raises: [Defect], raises: [Defect], tags: [RootEffect].}
- Source Edit
method closeImpl(s: LPStream): Future[void] {.base, stackTrace: false, ...gcsafe, raises: [Defect], raises: [Defect], tags: [RootEffect].}
- Source Edit
method initStream(s: LPStream) {.base, ...raises: [Defect], tags: [TimeEffect].}
- Source Edit
Templates
template formatItIMPL(it: LPStream): auto
- Source Edit