Read Data from Source

txt, timedout = source.read(p, [n], [timeout], [mask], [stripcodes])

Reads data from the source.

Parameter Type Description
p table Protocol table
n integer Number of bytes to read or wait for. If zero, or not present, then reads all that's currently available
timeout integer Milliseconds to wait for data to arrive
mask integer Whether to mask d7 for ASCII. 0 = 8-bit; 1 = 7-bit
stripcodes boolean Whether to remove non-printable ASCII. 1 = only keep characters, CR, LF, TAB, FF.
Returns Type Description
txt string Returned data
timedout boolean True = timedout in receive