mirror of
https://github.com/nmap/nmap.git
synced 2025-12-24 08:29:04 +00:00
Small nselib proofreading changes.
This commit is contained in:
@@ -4,16 +4,18 @@
|
||||
-- The functions in this module return values appropriate for use with
|
||||
-- exception handling via <code>nmap.new_try()</code>.
|
||||
--
|
||||
-- These functions may be passed a table of options, but it's not
|
||||
-- required. The keys for the options table are "bytes", "lines",
|
||||
-- "proto", and "timeout". "bytes" sets a minimum number of bytes to
|
||||
-- read. "lines" does the same for lines. "proto" sets the protocol to
|
||||
-- communicate with, defaulting to "tcp" if not provided. "timeout" sets
|
||||
-- the socket timeout (see the socket function
|
||||
-- <code>set_timeout()</code> for details).
|
||||
-- These functions may be passed a table of options, but it's not required. The
|
||||
-- keys for the options table are <code>"bytes"</code>, <code>"lines"</code>,
|
||||
-- <code>"proto"</code>, and <code>"timeout"</code>. <code>"bytes"</code> sets
|
||||
-- a minimum number of bytes to read. <code>"lines"</code> does the same for
|
||||
-- lines. <code>"proto"</code> sets the protocol to communicate with,
|
||||
-- defaulting to <code>"tcp"</code> if not provided. <code>"timeout"</code>
|
||||
-- sets the socket timeout (see the socket function <code>set_timeout()</code>
|
||||
-- for details).
|
||||
--
|
||||
-- If both "bytes" and "lines" are provided, "lines" takes precedence.
|
||||
-- If neither are given, the functions read as many bytes as possible.
|
||||
-- If both <code>"bytes"</code> and <code>"lines"</code> are provided,
|
||||
-- <code>"lines"</code> takes precedence. If neither are given, the functions
|
||||
-- read as many bytes as possible.
|
||||
-- @author Kris Katterjohn 04/2008
|
||||
-- @copyright Same as Nmap--See http://nmap.org/book/man-legal.html
|
||||
|
||||
|
||||
@@ -86,10 +86,11 @@ end
|
||||
-- does not include the separator. It will return the final data even if it is
|
||||
-- not followed by the separator. Once an error or EOF is reached, it returns
|
||||
-- <code>nil, msg</code>. <code>msg</code> is what is returned by
|
||||
-- <code>nmap.receive_lines()</code>.
|
||||
-- <code>nmap.receive_lines</code>.
|
||||
-- @param socket Socket for the buffer.
|
||||
-- @param sep Separator for the buffered reads.
|
||||
-- @return Data from socket reads.
|
||||
-- @return Data from socket reads or <code>nil</code> on EOF or error.
|
||||
-- @return Error message, as with <code>receive_lines()</code>.
|
||||
function make_buffer(socket, sep)
|
||||
local point, left, buffer, done, msg = 1, "";
|
||||
local function self()
|
||||
|
||||
Reference in New Issue
Block a user