Some style cleanup
This commit is contained in:
parent
2410e667bc
commit
ee9499ac89
1 changed files with 3 additions and 3 deletions
|
|
@ -295,7 +295,7 @@ else:
|
||||||
return retFuture
|
return retFuture
|
||||||
|
|
||||||
template readInto(buf: cstring, size: int, socket: AsyncSocket,
|
template readInto(buf: cstring, size: int, socket: AsyncSocket,
|
||||||
flags: set[SocketFlag]): int =
|
flags: set[SocketFlag]): int =
|
||||||
## Reads **up to** ``size`` bytes from ``socket`` into ``buf``. Note that
|
## Reads **up to** ``size`` bytes from ``socket`` into ``buf``. Note that
|
||||||
## this is a template and not a proc.
|
## this is a template and not a proc.
|
||||||
var res = 0
|
var res = 0
|
||||||
|
|
@ -420,7 +420,7 @@ proc accept*(socket: AsyncSocket,
|
||||||
return retFut
|
return retFut
|
||||||
|
|
||||||
proc recvLineInto*(socket: AsyncSocket, resString: ptr string,
|
proc recvLineInto*(socket: AsyncSocket, resString: ptr string,
|
||||||
flags = {SocketFlag.SafeDisconn}): Future[void] {.async.} =
|
flags = {SocketFlag.SafeDisconn}) {.async.} =
|
||||||
## Reads a line of data from ``socket`` into ``resString``.
|
## Reads a line of data from ``socket`` into ``resString``.
|
||||||
##
|
##
|
||||||
## If a full line is read ``\r\L`` is not
|
## If a full line is read ``\r\L`` is not
|
||||||
|
|
@ -490,7 +490,7 @@ proc recvLineInto*(socket: AsyncSocket, resString: ptr string,
|
||||||
elif c == "\L":
|
elif c == "\L":
|
||||||
addNLIfEmpty()
|
addNLIfEmpty()
|
||||||
return
|
return
|
||||||
add(resString[], c)
|
resString[].add c
|
||||||
|
|
||||||
proc recvLine*(socket: AsyncSocket,
|
proc recvLine*(socket: AsyncSocket,
|
||||||
flags = {SocketFlag.SafeDisconn}): Future[string] {.async.} =
|
flags = {SocketFlag.SafeDisconn}): Future[string] {.async.} =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue