Read from Source Until Match

txt, timedout, match = source.readuntil(p, txt, timeout)
txt, timedout, match = source.readuntil(p, tbl, timeout)

Reads from the source until either the string pattern, or table of string patterns, is found.

Parameter Type Description
p table Protocol table
txt string String pattern to match
tbl table Table of string patterns to match
timeout integer Millisecond timeout value
Returns Type Description
txt string Text up to the match
timedout boolean Whether timed out
mathch string The string that matched