diff options
Diffstat (limited to 'lib/pure/net.nim')
-rw-r--r-- | lib/pure/net.nim | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/pure/net.nim b/lib/pure/net.nim index a7025bd97..37e6e8f5a 100644 --- a/lib/pure/net.nim +++ b/lib/pure/net.nim @@ -1445,7 +1445,7 @@ proc recv*(socket: Socket, data: var string, size: int, timeout = -1, ## ## **Note**: `data` must be initialised. ## - ## **Warning**: Only the `SafeDisconn` flag is currently supported. + ## .. warning:: Only the `SafeDisconn` flag is currently supported. data.setLen(size) result = if timeout == -1: @@ -1480,7 +1480,7 @@ proc recv*(socket: Socket, size: int, timeout = -1, ## within the time specified a TimeoutError exception will be raised. ## ## - ## **Warning**: Only the `SafeDisconn` flag is currently supported. + ## .. warning:: Only the `SafeDisconn` flag is currently supported. result = newString(size) discard recv(socket, result, size, timeout, flags) @@ -1523,7 +1523,7 @@ proc readLine*(socket: Socket, line: var string, timeout = -1, ## The `maxLength` parameter determines the maximum amount of characters ## that can be read. The result is truncated after that. ## - ## **Warning**: Only the `SafeDisconn` flag is currently supported. + ## .. warning:: Only the `SafeDisconn` flag is currently supported. template addNLIfEmpty() = if line.len == 0: @@ -1579,7 +1579,7 @@ proc recvLine*(socket: Socket, timeout = -1, ## The `maxLength` parameter determines the maximum amount of characters ## that can be read. The result is truncated after that. ## - ## **Warning**: Only the `SafeDisconn` flag is currently supported. + ## .. warning:: Only the `SafeDisconn` flag is currently supported. result = "" readLine(socket, result, timeout, flags, maxLength) @@ -1592,10 +1592,10 @@ proc recvFrom*(socket: Socket, data: var string, length: int, ## If an error occurs an OSError exception will be raised. Otherwise the return ## value will be the length of data received. ## - ## **Warning:** This function does not yet have a buffered implementation, - ## so when `socket` is buffered the non-buffered implementation will be - ## used. Therefore if `socket` contains something in its buffer this - ## function will make no effort to return it. + ## .. warning:: This function does not yet have a buffered implementation, + ## so when `socket` is buffered the non-buffered implementation will be + ## used. Therefore if `socket` contains something in its buffer this + ## function will make no effort to return it. template adaptRecvFromToDomain(domain: Domain) = var addrLen = sizeof(sockAddress).SockLen result = recvfrom(socket.fd, cstring(data), length.cint, flags.cint, |