diff options
author | Danil Yarantsev <tiberiumk12@gmail.com> | 2021-03-29 14:06:23 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-29 13:06:23 +0200 |
commit | 89e0e0f27fe937b0eb7386f6f49f4b66f1d27edb (patch) | |
tree | 8611ee99653e4a1e607c0a9e32b851424a9f6012 /lib/pure | |
parent | c6dc9c02551e93fd4c53e48fd7fa8a0df7843267 (diff) | |
download | Nim-89e0e0f27fe937b0eb7386f6f49f4b66f1d27edb.tar.gz |
Small doc fixes in net (#17566)
Diffstat (limited to 'lib/pure')
-rw-r--r-- | lib/pure/net.nim | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/pure/net.nim b/lib/pure/net.nim index ca109dc22..9be9c6acb 100644 --- a/lib/pure/net.nim +++ b/lib/pure/net.nim @@ -1427,7 +1427,7 @@ proc recv*(socket: Socket, data: var string, size: int, timeout = -1, flags = {SocketFlag.SafeDisconn}): int = ## 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 ## 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 ## within the time specified a TimeoutError exception will be raised. ## - ## **Note**: `data` must be initialised. - ## ## .. warning:: Only the `SafeDisconn` flag is currently supported. data.setLen(size) result = @@ -1464,7 +1462,7 @@ proc recv*(socket: Socket, size: int, timeout = -1, flags = {SocketFlag.SafeDisconn}): string {.inline.} = ## 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 ## data. It will read this data in `BufferSize` chunks. |