avoid wrapping in several futures
This commit is contained in:
parent
13837619ed
commit
962f58b436
|
@ -232,8 +232,8 @@ method readUntil*(s: BufferStream,
|
||||||
|
|
||||||
method write*(s: BufferStream,
|
method write*(s: BufferStream,
|
||||||
pbytes: pointer,
|
pbytes: pointer,
|
||||||
nbytes: int)
|
nbytes: int): Future[void]
|
||||||
{.async, gcsafe.} =
|
{.gcsafe.} =
|
||||||
## Consume (discard) all bytes (n <= 0) or ``n`` bytes from read-only stream
|
## Consume (discard) all bytes (n <= 0) or ``n`` bytes from read-only stream
|
||||||
## ``rstream``.
|
## ``rstream``.
|
||||||
##
|
##
|
||||||
|
@ -244,8 +244,8 @@ method write*(s: BufferStream,
|
||||||
|
|
||||||
method write*(s: BufferStream,
|
method write*(s: BufferStream,
|
||||||
msg: string,
|
msg: string,
|
||||||
msglen = -1)
|
msglen = -1): Future[void]
|
||||||
{.async, gcsafe.} =
|
{.gcsafe.} =
|
||||||
## Write string ``sbytes`` of length ``msglen`` to writer stream ``wstream``.
|
## Write string ``sbytes`` of length ``msglen`` to writer stream ``wstream``.
|
||||||
##
|
##
|
||||||
## String ``sbytes`` must not be zero-length.
|
## String ``sbytes`` must not be zero-length.
|
||||||
|
@ -259,8 +259,8 @@ method write*(s: BufferStream,
|
||||||
|
|
||||||
method write*(s: BufferStream,
|
method write*(s: BufferStream,
|
||||||
msg: seq[byte],
|
msg: seq[byte],
|
||||||
msglen = -1)
|
msglen = -1): Future[void]
|
||||||
{.async, gcsafe.} =
|
{.gcsafe.} =
|
||||||
## Write sequence of bytes ``sbytes`` of length ``msglen`` to writer
|
## Write sequence of bytes ``sbytes`` of length ``msglen`` to writer
|
||||||
## stream ``wstream``.
|
## stream ``wstream``.
|
||||||
##
|
##
|
||||||
|
|
Loading…
Reference in New Issue