poll method

bool poll(
  1. int timeout
)

Polls for data available for reading from the serial port.

timeout can be positive for a timeout in milliseconds, zero for a non-blocking poll, or negative for a blocking poll. Returns 'true' on success (data available for reading), 'false on timeout,

Implementation

bool poll(int timeout) {
  _checkStatus();
  return _checkError(_nativeSerialPool(_serialHandle, timeout)) == 1
      ? true
      : false;
}