chronos/streams/asyncstream

    Dark Mode
Search:
Group by:
  Source   Edit

Types

AsyncBuffer = object
  backend*: BipBuffer
  events*: array[2, AsyncEvent]
  Source   Edit
AsyncStream = object of RootObj
  reader*: AsyncStreamReader
  writer*: AsyncStreamWriter
  Source   Edit
AsyncStreamError = object of AsyncError
  Source   Edit
AsyncStreamIncorrectDefect = object of Defect
  Source   Edit
AsyncStreamReader = ref object of RootRef
  rsource*: AsyncStreamReader
  tsource*: StreamTransport
  readerLoop*: StreamReaderLoop
  state*: AsyncStreamState
  buffer*: AsyncBufferRef
  udata: pointer
  error*: ref AsyncStreamError
  bytesCount*: uint64
  future: Future[void].Raising([])
  Source   Edit
AsyncStreamState = enum
  Running,                  ## Stream is online and working
  Error,                    ## Stream has stored error
  Stopped,                  ## Stream was closed while working
  Finished,                 ## Stream was properly finished
  Closing,                  ## Stream is closing
  Closed                     ## Stream was closed
  Source   Edit
AsyncStreamWriter = ref object of RootRef
  wsource*: AsyncStreamWriter
  tsource*: StreamTransport
  writerLoop*: StreamWriterLoop
  state*: AsyncStreamState
  queue*: AsyncQueue[WriteItem]
  error*: ref AsyncStreamError
  udata: pointer
  bytesCount*: uint64
  future: Future[void].Raising([])
  Source   Edit
StreamReaderLoop = proc (stream: AsyncStreamReader): Future[void] {.
    async: (...raises: []).}
Main read loop for read streams.   Source   Edit
StreamWriterLoop = proc (stream: AsyncStreamWriter): Future[void] {.
    async: (...raises: []).}
Main write loop for write streams.   Source   Edit
WriteItem = object
  case kind*: WriteType
  of Pointer:
      dataPtr*: pointer

  of Sequence:
      dataSeq*: seq[byte]

  of String:
      dataStr*: string

  size*: int
  offset*: int
  future*: Future[void].Raising([CancelledError, AsyncStreamError])
  Source   Edit
WriteType = enum
  Pointer, Sequence, String
  Source   Edit

Consts

AsyncStreamDefaultBufferSize = 16384
Default reading stream internal buffer size.   Source   Edit
AsyncStreamDefaultQueueSize = 0
Default writing stream internal queue size.   Source   Edit
AsyncStreamReaderTrackerName = "async.stream.reader"
AsyncStreamReader leaks tracker name   Source   Edit
AsyncStreamWriterTrackerName = "async.stream.writer"
AsyncStreamWriter leaks tracker name   Source   Edit

Procs

proc atEof(rstream: AsyncStreamReader): bool {....raises: [], tags: [].}
Returns true is reading stream is closed or finished and internal buffer do not have any bytes left.   Source   Edit
proc atEof(wstream: AsyncStreamWriter): bool {....raises: [], tags: [].}
Returns true is writing stream wstream closed or finished.   Source   Edit
proc close(rw: AsyncStreamRW) {....raises: [].}

Close and frees resources of stream rw.

Note close() procedure is not completed immediately!

  Source   Edit
proc closed(rw: AsyncStreamRW): bool {....raises: [].}
Returns true is reading/writing stream is closed.   Source   Edit
proc closeWait(rw: AsyncStreamRW): InternalRaisesFuture[void, void] {.
    stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [].}
Close and frees resources of stream rw.   Source   Edit
proc consume(rstream: AsyncStreamReader): InternalRaisesFuture[int,
    (CancelledError, AsyncStreamError)] {.stackTrace: false, ...raises: [], gcsafe,
    raises: [], raises: [], tags: [RootEffect].}

Consume (discard) all bytes from read-only stream rstream.

Return number of bytes actually consumed (discarded).

  Source   Edit
proc consume(rstream: AsyncStreamReader; n: int): InternalRaisesFuture[int,
    (CancelledError, AsyncStreamError)] {.stackTrace: false, ...raises: [], gcsafe,
    raises: [], raises: [], tags: [RootEffect].}

Consume (discard) all bytes (n <= 0) or n bytes from read-only stream rstream.

Return number of bytes actually consumed (discarded).

  Source   Edit
proc failed(rw: AsyncStreamRW): bool {....raises: [].}
Returns true if reading/writing stream is in failed state.   Source   Edit
proc finish(wstream: AsyncStreamWriter): InternalRaisesFuture[void,
    (CancelledError, AsyncStreamError)] {.stackTrace: false, ...raises: [], gcsafe,
    raises: [], raises: [], tags: [RootEffect].}
Finish write stream wstream.   Source   Edit
proc finished(rw: AsyncStreamRW): bool {....raises: [].}
Returns true if reading/writing stream is finished (completed).   Source   Edit
proc forget(sb: AsyncBufferRef) {.inline, ...raises: [], tags: [].}
  Source   Edit
proc getUserData[T](rw: AsyncStreamRW): T {.inline, ...raises: [].}
Obtain user data associated with AsyncStreamReader or AsyncStreamWriter object rw.   Source   Edit
proc init(child, rsource: AsyncStreamReader) {....raises: [], tags: [RootEffect].}
Initialize newly allocated object child with AsyncStreamReader parameters.   Source   Edit
proc init(child, rsource: AsyncStreamReader; loop: StreamReaderLoop;
          bufferSize = AsyncStreamDefaultBufferSize) {....raises: [],
    tags: [RootEffect].}
Initialize newly allocated object child with AsyncStreamReader parameters.   Source   Edit
proc init(child, wsource: AsyncStreamWriter) {....raises: [], tags: [RootEffect].}
Initialize newly allocated object child with AsyncStreamWriter parameters.   Source   Edit
proc init(child, wsource: AsyncStreamWriter; loop: StreamWriterLoop;
          queueSize = AsyncStreamDefaultQueueSize) {....raises: [],
    tags: [RootEffect].}
Initialize newly allocated object child with AsyncStreamWriter parameters.   Source   Edit
proc init(child: AsyncStreamReader; tsource: StreamTransport) {....raises: [],
    tags: [RootEffect].}
Initialize newly allocated object child with AsyncStreamReader parameters.   Source   Edit
proc init(child: AsyncStreamWriter; tsource: StreamTransport) {....raises: [],
    tags: [RootEffect].}
Initialize newly allocated object child with AsyncStreamWriter parameters.   Source   Edit
proc init[T](child, rsource: AsyncStreamReader; loop: StreamReaderLoop;
             bufferSize = AsyncStreamDefaultBufferSize; udata: ref T) {.
    ...raises: [].}
Initialize newly allocated object child with AsyncStreamReader parameters.   Source   Edit
proc init[T](child, rsource: AsyncStreamReader; udata: ref T) {....raises: [].}
Initialize newly allocated object child with AsyncStreamReader parameters.   Source   Edit
proc init[T](child, wsource: AsyncStreamWriter; loop: StreamWriterLoop;
             queueSize = AsyncStreamDefaultQueueSize; udata: ref T) {....raises: [].}
Initialize newly allocated object child with AsyncStreamWriter parameters.   Source   Edit
proc init[T](child, wsource: AsyncStreamWriter; udata: ref T) {....raises: [].}
Initialize newly allocated object child with AsyncStreamWriter parameters.   Source   Edit
proc init[T](child: AsyncStreamReader; tsource: StreamTransport; udata: ref T) {.
    ...raises: [].}
Initialize newly allocated object child with AsyncStreamReader parameters.   Source   Edit
proc init[T](child: AsyncStreamWriter; tsource: StreamTransport; udata: ref T) {.
    ...raises: [].}
Initialize newly allocated object child with AsyncStreamWriter parameters.   Source   Edit
proc join(rw: AsyncStreamRW): InternalRaisesFuture[void, (CancelledError,)] {.
    stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [].}
  Source   Edit
proc new(t: typedesc[AsyncBufferRef]; size: int): AsyncBufferRef {....raises: [].}
  Source   Edit
proc newAsyncStreamIncompleteError(): ref AsyncStreamIncompleteError {.noinline,
    ...raises: [], tags: [].}
  Source   Edit
proc newAsyncStreamLimitError(): ref AsyncStreamLimitError {.noinline,
    ...raises: [], tags: [].}
  Source   Edit
proc newAsyncStreamReader(rsource: AsyncStreamReader): AsyncStreamReader {.
    ...raises: [], tags: [RootEffect].}
Create copy of AsyncStreamReader object rsource.   Source   Edit
proc newAsyncStreamReader(rsource: AsyncStreamReader; loop: StreamReaderLoop;
                          bufferSize = AsyncStreamDefaultBufferSize): AsyncStreamReader {.
    ...raises: [], tags: [RootEffect].}

Create new AsyncStreamReader object, which will use other async stream reader rsource as source data channel.

loop is main reading loop procedure.

bufferSize is internal buffer size.

  Source   Edit
proc newAsyncStreamReader(tsource: StreamTransport): AsyncStreamReader {.
    ...raises: [], tags: [RootEffect].}
Create new AsyncStreamReader object, which will use stream transport tsource as source data channel.   Source   Edit
proc newAsyncStreamReader[T](rsource: AsyncStreamReader; loop: StreamReaderLoop;
                             bufferSize = AsyncStreamDefaultBufferSize;
                             udata: ref T): AsyncStreamReader {....raises: [].}

Create new AsyncStreamReader object, which will use other async stream reader rsource as source data channel.

loop is main reading loop procedure.

bufferSize is internal buffer size.

udata - user object which will be associated with new AsyncStreamReader object.

  Source   Edit
proc newAsyncStreamReader[T](rsource: AsyncStreamReader; udata: ref T): AsyncStreamReader {.
    ...raises: [].}

Create copy of AsyncStreamReader object rsource.

udata - user object which will be associated with new AsyncStreamReader object.

  Source   Edit
proc newAsyncStreamReader[T](tsource: StreamTransport; udata: ref T): AsyncStreamReader {.
    ...raises: [].}

Create new AsyncStreamReader object, which will use stream transport tsource as source data channel.

udata - user object which will be associated with new AsyncStreamWriter object.

  Source   Edit
proc newAsyncStreamUseClosedError(): ref AsyncStreamUseClosedError {.noinline,
    ...raises: [], tags: [].}
  Source   Edit
proc newAsyncStreamWriter(tsource: StreamTransport): AsyncStreamWriter {.
    ...raises: [], tags: [RootEffect].}
Create new AsyncStreamWriter object which will use stream transport tsource as data channel.   Source   Edit
proc newAsyncStreamWriter(wsource: AsyncStreamWriter): AsyncStreamWriter {.
    ...raises: [], tags: [RootEffect].}
Create copy of AsyncStreamWriter object wsource.   Source   Edit
proc newAsyncStreamWriter(wsource: AsyncStreamWriter; loop: StreamWriterLoop;
                          queueSize = AsyncStreamDefaultQueueSize): AsyncStreamWriter {.
    ...raises: [], tags: [RootEffect].}

Create new AsyncStreamWriter object which will use other AsyncStreamWriter object wsource as data channel.

loop is main writing loop procedure.

queueSize is writing queue size (default size is unlimited).

  Source   Edit
proc newAsyncStreamWriter[T](tsource: StreamTransport; udata: ref T): AsyncStreamWriter {.
    ...raises: [].}

Create new AsyncStreamWriter object which will use stream transport tsource as data channel.

udata - user object which will be associated with new AsyncStreamWriter object.

  Source   Edit
proc newAsyncStreamWriter[T](wsource: AsyncStreamWriter; loop: StreamWriterLoop;
                             queueSize = AsyncStreamDefaultQueueSize;
                             udata: ref T): AsyncStreamWriter {....raises: [].}

Create new AsyncStreamWriter object which will use other AsyncStreamWriter object wsource as data channel.

loop is main writing loop procedure.

queueSize is writing queue size (default size is unlimited).

udata - user object which will be associated with new AsyncStreamWriter object.

  Source   Edit
proc newAsyncStreamWriter[T](wsource: AsyncStreamWriter; udata: ref T): AsyncStreamWriter {.
    ...raises: [].}

Create copy of AsyncStreamWriter object wsource.

udata - user object which will be associated with new AsyncStreamWriter object.

  Source   Edit
proc raiseAsyncStreamIncompleteError() {.noinline, noreturn,
    ...raises: [AsyncStreamIncompleteError], raises: [], tags: [].}
  Source   Edit
proc raiseAsyncStreamLimitError() {.noinline, noreturn,
                                    ...raises: [AsyncStreamLimitError], raises: [],
                                    tags: [].}
  Source   Edit
proc raiseAsyncStreamUseClosedError() {.noinline, noreturn,
                                        ...raises: [AsyncStreamUseClosedError],
                                        raises: [], tags: [].}
  Source   Edit
proc raiseAsyncStreamWriteEOFError() {.noinline, noreturn,
                                       ...raises: [AsyncStreamWriteEOFError],
                                       raises: [], tags: [].}
  Source   Edit
proc raiseEmptyMessageDefect() {.noinline, noreturn, ...raises: [], tags: [].}
  Source   Edit
proc read(rstream: AsyncStreamReader): InternalRaisesFuture[seq[byte],
    (CancelledError, AsyncStreamError)] {.stackTrace: false, ...raises: [], gcsafe,
    raises: [], raises: [], tags: [RootEffect].}

Read all bytes from read-only stream rstream.

This procedure allocates buffer seq[byte] and return it as result.

  Source   Edit
proc read(rstream: AsyncStreamReader; n: int): InternalRaisesFuture[seq[byte],
    (CancelledError, AsyncStreamError)] {.stackTrace: false, ...raises: [], gcsafe,
    raises: [], raises: [], tags: [RootEffect].}

Read all bytes (n <= 0) or exactly n bytes from read-only stream rstream.

This procedure allocates buffer seq[byte] and return it as result.

  Source   Edit
proc readExactly(rstream: AsyncStreamReader; pbytes: pointer; nbytes: int): InternalRaisesFuture[
    void, (CancelledError, AsyncStreamError)] {.stackTrace: false, ...raises: [],
    gcsafe, raises: [], raises: [], tags: [RootEffect].}

Read exactly nbytes bytes from read-only stream rstream and store it to pbytes.

If EOF is received and nbytes is not yet read, the procedure will raise AsyncStreamIncompleteError.

  Source   Edit
proc readLine(rstream: AsyncStreamReader; limit = 0; sep = "\r\n"): InternalRaisesFuture[
    string, (CancelledError, AsyncStreamError)] {.stackTrace: false, ...raises: [],
    gcsafe, raises: [], raises: [], tags: [RootEffect].}

Read one line from read-only stream rstream, where "line" is a sequence of bytes ending with sep (default is "\r\n").

If EOF is received, and sep was not found, the method will return the partial read bytes.

If the EOF was received and the internal buffer is empty, return an empty string.

If limit more then 0, then result string will be limited to limit bytes.

  Source   Edit
proc readMessage(rstream: AsyncStreamReader; pred: ReadMessagePredicate): InternalRaisesFuture[
    void, (CancelledError, AsyncStreamError)] {.stackTrace: false, ...raises: [],
    gcsafe, raises: [], raises: [], tags: [RootEffect].}

Read all bytes from stream rstream until predicate callback will not be satisfied.

predicate callback should return tuple (consumed, result), where consumed is the number of bytes processed and result is a completion flag (true if readMessage() should stop reading data, or false if readMessage() should continue to read data from stream).

predicate callback must copy all the data from data array and return number of bytes it is going to consume. predicate callback will receive (zero-length) openArray, if stream is at EOF.

  Source   Edit
proc readOnce(rstream: AsyncStreamReader; pbytes: pointer; nbytes: int): InternalRaisesFuture[
    int, (CancelledError, AsyncStreamError)] {.stackTrace: false, ...raises: [],
    gcsafe, raises: [], raises: [], tags: [RootEffect].}

Perform one read operation on read-only stream rstream.

If internal buffer is not empty, nbytes bytes will be transferred from internal buffer, otherwise it will wait until some bytes will be available.

  Source   Edit
proc readUntil(rstream: AsyncStreamReader; pbytes: pointer; nbytes: int;
               sep: seq[byte]): InternalRaisesFuture[int,
    (CancelledError, AsyncStreamError)] {.stackTrace: false, ...raises: [], gcsafe,
    raises: [], raises: [], tags: [RootEffect].}

Read data from the read-only stream rstream until separator sep is found.

On success, the data and separator will be removed from the internal buffer (consumed). Returned data will include the separator at the end.

If EOF is received, and sep was not found, procedure will raise AsyncStreamIncompleteError.

If nbytes bytes has been received and sep was not found, procedure will raise AsyncStreamLimitError.

Procedure returns actual number of bytes read.

  Source   Edit
proc running(rw: AsyncStreamRW): bool {....raises: [].}
Returns true if reading/writing stream is still pending.   Source   Edit
proc stopped(rw: AsyncStreamRW): bool {....raises: [].}
Returns true if reading/writing stream is stopped (interrupted).   Source   Edit
proc upload(sb: AsyncBufferRef; pbytes: ptr byte; nbytes: int): InternalRaisesFuture[
    void, (CancelledError,)] {.stackTrace: false, ...raises: [], gcsafe,
                               raises: [], raises: [], tags: [RootEffect].}
You can upload any amount of bytes to the buffer. If size of internal buffer is not enough to fit all the data at once, data will be uploaded via chunks of size up to internal buffer size.   Source   Edit
proc write(wstream: AsyncStreamWriter; pbytes: pointer; nbytes: int): InternalRaisesFuture[
    void, (CancelledError, AsyncStreamError)] {.stackTrace: false, ...raises: [],
    gcsafe, raises: [], raises: [], tags: [RootEffect].}

Write sequence of bytes pointed by pbytes of length nbytes to writer stream wstream.

nbytes must be more then zero.

  Source   Edit
proc write(wstream: AsyncStreamWriter; sbytes: seq[byte]; msglen = -1): InternalRaisesFuture[
    void, (CancelledError, AsyncStreamError)] {.stackTrace: false, ...raises: [],
    gcsafe, raises: [], raises: [], tags: [RootEffect].}

Write sequence of bytes sbytes of length msglen to writer stream wstream.

Sequence of bytes sbytes must not be zero-length.

If msglen < 0 whole sequence sbytes will be writen to stream. If msglen > len(sbytes) only len(sbytes) bytes will be written to stream.

  Source   Edit
proc write(wstream: AsyncStreamWriter; sbytes: string; msglen = -1): InternalRaisesFuture[
    void, (CancelledError, AsyncStreamError)] {.stackTrace: false, ...raises: [],
    gcsafe, raises: [], raises: [], tags: [RootEffect].}

Write string sbytes of length msglen to writer stream wstream.

String sbytes must not be zero-length.

If msglen < 0 whole string sbytes will be writen to stream. If msglen > len(sbytes) only len(sbytes) bytes will be written to stream.

  Source   Edit

Templates

template checkStreamClosed(t: untyped)
  Source   Edit
template checkStreamFinished(t: untyped)
  Source   Edit
template copyOut(dest: pointer; item: WriteItem; length: int)
  Source   Edit
template transfer(sb: AsyncBufferRef): untyped
  Source   Edit
template wait(sb: AsyncBufferRef): untyped
  Source   Edit

Exports

setThreadDispatcher, closeSocket, ENOSR, EHOSTUNREACH, EHOSTDOWN, ECONNRESET, EDQUOT, fail, ECANCELED, EMLINK, FuturePendingError, milliseconds, <=, +=, $, asyncTimer, internalRaiseIfError, getSrcLocation, FutureError, fromNow, weeks, ESPIPE, withTimeout, LocationKind, id, <=, FutureCompletedError, ENOEXEC, ESHUTDOWN, fail, EREMOTEIO, toString, EXFULL, waitFor, complete, ==, oneValue, internalInitFutureBase, EPROTONOSUPPORT, Nanosecond, epochNanoSeconds, cancelAndWait, addTimer, Moment, ECOMM, EPROTOTYPE, AsyncExceptionError, milliseconds, getTrackerCounter, ENOENT, millis, removeTimer, FutureFlag, ENOTCONN, EBUSY, init, ENOTUNIQ, days, +=, await, or, ZeroDuration, EKEYREVOKED, AsyncTimeoutError, EUCLEAN, Second, EEXIST, ENOLINK, newInternalRaisesFuture, idleAsync, ==, internalRaiseIfError, SomeIntegerI64, ENOMEM, ENOKEY, +, removeWriter2, ENOMSG, [], trackCounter, EKEYEXPIRED, Week, isCounterLeaked, awaitne, EAFNOSUPPORT, EWOULDBLOCK, EREMOTE, Finished, untrackCounter, AsyncCallback, EHWPOISON, epochSeconds, newDispatcher, EPERM, microseconds, trackerCounters, >=, weeks, Finished, cancelCallback=, ETOOMANYREFS, $, EISCONN, callSoon, ESOCKTNOSUPPORT, setGlobalDispatcher, EXDEV, EBADF, cancelSoon, allFinished, TrackerBase, hours, InternalAsyncCallback, EBFONT, ENETDOWN, EACCES, ELOOP, InfiniteDuration, ETIMEDOUT, >=, EINVAL, value, EBADFD, Future, completed, PDispatcher, ESRCH, EL2NSYNC, EFAULT, low, ESTRPIPE, -=, or, ENOTSOCK, getAsyncTimestamp, await, Hour, EIDRM, removeReader2, secs, getThreadDispatcher, futureContinue, ENOANO, EADV, CallbackFunc, ENFILE, FutureBase, waitFor, high, Microsecond, ENOPKG, ELIBBAD, callSoon, EOWNERDEAD, flags, ERANGE, done, ENONET, completed, callSoon, cancelSoon, EMSGSIZE, EALREADY, EBADMSG, EILSEQ, ENOPROTOOPT, SrcLoc, allFutures, -, complete, FutureState, EBADR, nanos, location, FutureDefect, EDOTDOT, ENOBUFS, EKEYREJECTED, <, Minute, error, ==, one, CancelledError, nanoseconds, EISDIR, EOVERFLOW, FutureSeq, cancelAndWait, micros, all, -, ESRMNT, ENOTEMPTY, EPROTO, TimerCallback, microseconds, error, ENOTRECOVERABLE, wait, callIdle, join, hours, AsyncError, EBADRQC, ENODEV, tryCancel, addTimer, ECHRNG, ENOTDIR, EUNATCH, cancelAndSchedule, failed, nanoseconds, ERESTART, *, ETXTBSY, getTracker, newFutureStr, EMFILE, LocFinishIndex, withTimeout, addTimer, race, EUSERS, ENOTBLK, ENOTTY, EISNAM, ELIBACC, ENAVAIL, init, race, internalCallTick, EDESTADDRREQ, +, cancelSoon, completed, minutes, cancel, FutureFlags, getGlobalDispatcher, ELIBEXEC, stepsAsync, micros, wait, EINPROGRESS, EPFNOSUPPORT, E2BIG, -=, runForever, ENOMEDIUM, secs, value, read, waitFor, EL3HLT, unregisterAndCloseFd, EBADSLT, InternalRaisesFuture, -, <, ENETRESET, fastEpochTime, ENXIO, isZero, EPIPE, allFutures, Day, wait, now, read, asyncSpawn, removeCallback, EAGAIN, raiseOsDefect, trackerCounterKeys, EADDRNOTAVAIL, read, removeCallback, TrackerCounter, async, addCallback, init, async, EREMCHG, finished, addCallback, seconds, noCancel, low, AsyncFD, ECHILD, Raising, init, ECONNABORTED, state, wait, >, callIdle, removeTimer, LocCreateIndex, addReader2, ETIME, ENOLCK, EDEADLK, asyncCheck, Duration, ELNRNG, EDOM, ENOCSI, millis, EBADE, EMEDIUMTYPE, readError, sleepAsync, isInfinite, asyncDiscard, callback=, ENETUNREACH, InternalFutureBase, callIdle, ENOSYS, ELIBSCN, EIO, EROFS, seconds, ELIBMAX, div, init, EL2HLT, EOPNOTSUPP, FutureStr, poll, oneIndex, clearTimer, register2, LocCompleteIndex, days, ENOSTR, EADDRINUSE, one, sleepAsync, ENAMETOOLONG, EMULTIHOP, ESTALE, race, ENODATA, EFBIG, +, minutes, ERFKILL, cancelled, $, toException, join, EDEADLOCK, allFutures, MaxEventsCount, wait, read, raiseAsDefect, ENOSPC, Millisecond, >, setTimer, cancelSoon, unregister2, failed, waitFor, newFutureSeq, addTracker, callback=, orImpl, ECONNREFUSED, high, ENOTNAM, nanos, addWriter2, removeTimer, internalCallTick, EINTR, and, closeHandle, EL3RST, readError, *, newFuture, internalCallTick, []=, EDQUOT, Second, closeSocket, EHOSTUNREACH, EHOSTDOWN, closeWait, ECONNRESET, ==, fail, ECANCELED, EMLINK, milliseconds, FutureBase, <=, +=, $, asyncTimer, internalRaiseIfError, getSrcLocation, FutureError, fromNow, close, weeks, LocFinishIndex, ESPIPE, withTimeout, LocationKind, id, isSet, <=, FutureCompletedError, SomeIntegerI64, fail, EREMOTEIO, waitFor, addTimer, ==, oneValue, internalInitFutureBase, EPROTONOSUPPORT, nanoseconds, cancelAndWait, addTimer, Moment, ECOMM, addFirst, register, EPROTOTYPE, [], AsyncExceptionError, and, SrcLoc, ENOCSI, milliseconds, getTrackerCounter, ENOENT, millis, removeTimer, ELIBACC, EADDRNOTAVAIL, ENOTCONN, EBUSY, init, waitFor, days, +=, await, EAFNOSUPPORT, cancelSoon, AsyncTimeoutError, internalCallTick, []=, setThreadDispatcher, EEXIST, isInfinite, ENOLINK, newInternalRaisesFuture, idleAsync, internalRaiseIfError, ESHUTDOWN, ENOMEM, ENOKEY, +, removeWriter2, ENOMSG, [], trackCounter, EKEYEXPIRED, Week, isCounterLeaked, awaitne, $, EWOULDBLOCK, EREMOTE, unregister, Finished, untrackCounter, AsyncCallback, EHWPOISON, epochSeconds, newDispatcher, EPERM, microseconds, trackerCounters, >=, sleepAsync, addCallback, weeks, EFAULT, callIdle, cancelCallback=, ETOOMANYREFS, mitems, EISCONN, callSoon, ESOCKTNOSUPPORT, newAsyncQueue, setGlobalDispatcher, AsyncQueue, EXDEV, EBADF, EKEYREVOKED, micros, microseconds, hours, wait, ENETDOWN, EACCES, AsyncEvent, AsyncEventQueue, ELOOP, InfiniteDuration, ETIMEDOUT, >=, clear, EINVAL, ==, EBADFD, Future, addCallback, len, completed, PDispatcher, ESRCH, EL2NSYNC, Finished, low, popFirst, ESTRPIPE, -=, contains, getAsyncTimestamp, div, race, Hour, EIDRM, removeReader2, EventQueueReader, secs, getThreadDispatcher, EventQueueKey, futureContinue, popFirstNoWait, join, ENOANO, readError, CallbackFunc, $, FutureStr, addLastNoWait, ENOEXEC, waitFor, high, Microsecond, complete, $, pairs, ELIBBAD, callSoon, EOWNERDEAD, oneIndex, ERANGE, done, clearTimer, popLastNoWait, ENONET, completed, callSoon, release, cancelSoon, EMSGSIZE, EBADMSG, EILSEQ, ENOPROTOOPT, Day, allFutures, empty, -, complete, FutureState, addFirstNoWait, EBADR, nanos, location, FutureDefect, EDOTDOT, ENOBUFS, put, EKEYREJECTED, <, Minute, error, epochNanoSeconds, one, CancelledError, EISDIR, EOVERFLOW, FutureSeq, cancelAndWait, micros, all, -, ESRMNT, ENOTEMPTY, EPROTO, TimerCallback, TrackerBase, ENOTRECOVERABLE, EBFONT, callIdle, EDOM, value, hours, AsyncError, EBADRQC, ENODEV, ENFILE, ENOPKG, callback=, ECHRNG, wait, EUNATCH, cancelAndSchedule, failed, nanoseconds, ERESTART, *, ETXTBSY, getTracker, newFutureStr, full, EMFILE, orImpl, withTimeout, addTimer, race, EUSERS, ENOTBLK, ENOTTY, EISNAM, ENOSR, init, EXFULL, EUCLEAN, EDESTADDRREQ, +, cancelSoon, minutes, cancel, FutureFlags, getGlobalDispatcher, ELIBEXEC, stepsAsync, error, allFinished, wait, clear, value, EINPROGRESS, completed, E2BIG, -=, runForever, ENOMEDIUM, secs, AsyncQueueEmptyError, read, waitFor, EINTR, unregisterAndCloseFd, EBADSLT, or, [], -, EALREADY, <, ENETRESET, fastEpochTime, waitEvents, seconds, isZero, FuturePendingError, EPIPE, AsyncLockError, InternalFutureBase, getNoWait, allFutures, len, race, ENAVAIL, EPFNOSUPPORT, wait, EMULTIHOP, read, asyncSpawn, removeCallback, EAGAIN, raiseOsDefect, trackerCounterKeys, FutureFlag, read, removeCallback, TrackerCounter, async, AsyncLock, init, popLast, async, EREMCHG, finished, fire, ENXIO, or, seconds, noCancel, low, AsyncFD, ECHILD, init, ECONNABORTED, state, ENOTDIR, >, callIdle, removeTimer, LocCreateIndex, setTimer, ETIME, InternalRaisesFuture, EBADE, EDEADLK, items, cancelSoon, asyncCheck, unregister2, Duration, ELNRNG, locked, join, millis, EMEDIUMTYPE, readError, ZeroDuration, newFutureSeq, newAsyncEventQueue, asyncDiscard, InternalAsyncCallback, ENETUNREACH, get, ENOSYS, acquire, ELIBSCN, EIO, EROFS, AsyncEventQueueFullError, ELIBMAX, newAsyncEvent, ENOLCK, EFBIG, EL2HLT, AsyncQueueFullError, EOPNOTSUPP, emit, tryCancel, poll, readerOverflow, flags, register2, LocCompleteIndex, newAsyncLock, sleepAsync, days, ENOSTR, EADDRINUSE, one, size, newFuture, now, putNoWait, Nanosecond, wait, ESTALE, Raising, await, ENODATA, init, +, minutes, ERFKILL, cancelled, toException, EDEADLOCK, allFutures, MaxEventsCount, wait, read, raiseAsDefect, ENOSPC, Millisecond, addLast, >, addReader2, failed, ENOTUNIQ, addTracker, callback=, ENOTSOCK, ECONNREFUSED, high, ENOTNAM, nanos, addWriter2, toString, removeTimer, internalCallTick, EL3HLT, closeHandle, EL3RST, EADV, *, ENAMETOOLONG, internalCallTick, localAddress2, close, createStreamServer, createStreamServer, start2, StreamCallback2, closeWait, fromPipe, readLine, TransportFlags, ReadMessagePredicate, TransportInitCallback, localAddress, createStreamServer, running, StreamTransportTrackerName, StreamCallback, getUserData, createStreamServer, connect, join, finished, readExactly, start, localAddress, TransportKind, write, write, writeFile, SocketFlags, atEof, createStreamServer, readMessage, shutdownWait, closed, StreamServer, accept, remoteAddress2, createStreamServer, close, readOnce, DefaultBacklogSize, write, createStreamServer, closed, connect, toUnchecked, consume, toException, readUntil, read, createStreamServer, stop2, createStreamServer, consume, failed, createStreamServer, closeWait, join, StreamServerTrackerName, StreamTransport, stop, remoteAddress, fromPipe2, read, ==, DualStackType, toHex, getAutoAddress, address, ==, resolveTAddress, TransportAddress, TransportIncompleteError, getAutoAddresses, ==, initTAddress, AddressFamily, ServerStatus, host, getTransportOsError, getTransportOsError, $, getTransportTooManyError, windowsAnyAddressFix, setDualstack, toIpAddress, $, $, TransportNoSupport, TransportUseClosedError, TransportUseEofError, ServerFlags, resolveTAddress, TransportAbortedError, ==, initTAddress, $, setDualstack, resolveTAddress, getConnectionAbortedError, toSAddr, TransportError, AnyAddress, resolveTAddress, ==, getDomain, getServerUseClosedError, resolveTAddress, fromSAddr, TransportTooManyError, checkClosed, ServerCommand, getTransportUseClosedError, getTransportError, resolveTAddress, initTAddress, raiseTransportOsError, TransportOsError, getDomain, resolveTAddress, checkWriteEof, resolveTAddress, isAvailable, SocketServer, ==, DefaultDatagramBufferSize, getError, TransportAddressError, TransportLimitError, DefaultStreamBufferSize, getConnectionAbortedError, raiseTransportError, AnyAddress6, checkClosed, TransportState, initTAddress