diff --git a/nselib/nmap.luadoc b/nselib/nmap.luadoc index 61d4becae..05bdbac89 100644 --- a/nselib/nmap.luadoc +++ b/nselib/nmap.luadoc @@ -279,12 +279,12 @@ function receive() --- Receives lines from an open connection. -- -- Tries to receive at least n lines from an open connection. A --- line is a string delimited with \n characters. If it was not --- possible to receive at least n lines before the operation times --- out a "TIMEOUT" error occurs. On the other hand, if more than --- n lines were received, all are returned, not just --- n. Use stdnse.make_buffer to guarantee only one --- line is returned per call. +-- line is a string delimited with \n characters. If no data was +-- was received before the operation times out a "TIMEOUT" error +-- occurs. If even one character was received then it is returned with success. +-- On the other hand, if more than n lines were received, all are +-- returned, not just n. Use stdnse.make_buffer to +-- guarantee only one line is returned per call. -- -- On success the function returns true along with the received data. If -- receiving data has failed, the function returns false along with an error @@ -301,8 +301,8 @@ function receive_lines(n) -- Tries to receive at least n bytes from an open connection. Like -- in receive_lines, n is the minimum amount of -- characters we would like to receive. If more arrive, we get all of them. If --- fewer than n characters arrive before the operation times out, --- a "TIMEOUT" error occurs. +-- even one is received then it is returned. If no characters arrive before the +-- operation times out, a "TIMEOUT" error occurs. -- -- On success the function returns true along with the received data. If -- receiving data has failed, the function returns false along with an error