Merge branch 'devel' into async-improvements
This commit is contained in:
commit
47d05b3f2e
201 changed files with 6604 additions and 2628 deletions
|
|
@ -286,6 +286,7 @@ template readInto(buf: pointer, size: int, socket: AsyncSocket,
|
|||
flags: set[SocketFlag]): int =
|
||||
## Reads **up to** ``size`` bytes from ``socket`` into ``buf``. Note that
|
||||
## this is a template and not a proc.
|
||||
assert(not socket.closed, "Cannot `recv` on a closed socket")
|
||||
var res = 0
|
||||
if socket.isSsl:
|
||||
when defineSsl:
|
||||
|
|
@ -412,6 +413,7 @@ proc send*(socket: AsyncSocket, buf: pointer, size: int,
|
|||
## Sends ``size`` bytes from ``buf`` to ``socket``. The returned future will complete once all
|
||||
## data has been sent.
|
||||
assert socket != nil
|
||||
assert(not socket.closed, "Cannot `send` on a closed socket")
|
||||
if socket.isSsl:
|
||||
when defineSsl:
|
||||
sslLoop(socket, flags,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue