Small doc fixes in net (#17566)
This commit is contained in:
parent
c6dc9c0255
commit
89e0e0f27f
1 changed files with 2 additions and 4 deletions
|
|
@ -1427,7 +1427,7 @@ proc recv*(socket: Socket, data: var string, size: int, timeout = -1,
|
||||||
flags = {SocketFlag.SafeDisconn}): int =
|
flags = {SocketFlag.SafeDisconn}): int =
|
||||||
## Higher-level version of `recv`.
|
## Higher-level version of `recv`.
|
||||||
##
|
##
|
||||||
## Reads **up to** `size` bytes from `socket` into `buf`.
|
## Reads **up to** `size` bytes from `socket` into `data`.
|
||||||
##
|
##
|
||||||
## For buffered sockets this function will attempt to read all the requested
|
## For buffered sockets this function will attempt to read all the requested
|
||||||
## data. It will read this data in `BufferSize` chunks.
|
## data. It will read this data in `BufferSize` chunks.
|
||||||
|
|
@ -1444,8 +1444,6 @@ proc recv*(socket: Socket, data: var string, size: int, timeout = -1,
|
||||||
## A timeout may be specified in milliseconds, if enough data is not received
|
## A timeout may be specified in milliseconds, if enough data is not received
|
||||||
## within the time specified a TimeoutError exception will be raised.
|
## within the time specified a TimeoutError exception will be raised.
|
||||||
##
|
##
|
||||||
## **Note**: `data` must be initialised.
|
|
||||||
##
|
|
||||||
## .. warning:: Only the `SafeDisconn` flag is currently supported.
|
## .. warning:: Only the `SafeDisconn` flag is currently supported.
|
||||||
data.setLen(size)
|
data.setLen(size)
|
||||||
result =
|
result =
|
||||||
|
|
@ -1464,7 +1462,7 @@ proc recv*(socket: Socket, size: int, timeout = -1,
|
||||||
flags = {SocketFlag.SafeDisconn}): string {.inline.} =
|
flags = {SocketFlag.SafeDisconn}): string {.inline.} =
|
||||||
## Higher-level version of `recv` which returns a string.
|
## Higher-level version of `recv` which returns a string.
|
||||||
##
|
##
|
||||||
## Reads **up to** `size` bytes from `socket` into `buf`.
|
## Reads **up to** `size` bytes from `socket` into the result.
|
||||||
##
|
##
|
||||||
## For buffered sockets this function will attempt to read all the requested
|
## For buffered sockets this function will attempt to read all the requested
|
||||||
## data. It will read this data in `BufferSize` chunks.
|
## data. It will read this data in `BufferSize` chunks.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue