Merge pull request #4718 from mattb5906/new-feature/stream-timeout-get-4680

Add getTimeout accessor method.
This commit is contained in:
Sandeep Mistry 2016-07-18 14:18:59 -04:00
commit 98134a4aee
2 changed files with 3 additions and 1 deletions

View File

@ -66,7 +66,8 @@ class Stream : public Print
// parsing methods
void setTimeout(unsigned long timeout); // sets maximum milliseconds to wait for stream data, default is 1 second
unsigned long getTimeout(void) { return _timeout; }
bool find(char *target); // reads data from the stream until the target string is found
bool find(uint8_t *target) { return find ((char *)target); }
// returns true if target string is found, false if timed out (see setTimeout)

View File

@ -66,6 +66,7 @@ class Stream : public Print
// parsing methods
void setTimeout(unsigned long timeout); // sets maximum milliseconds to wait for stream data, default is 1 second
unsigned long getTimeout(void) { return _timeout; }
bool find(char *target); // reads data from the stream until the target string is found
bool find(uint8_t *target) { return find ((char *)target); }