self = port:setReadTimeout(newTimeout)
Sets the maximum amount of time that the platform should wait for the first byte. This affects the behavior of read(). By default the timeout is 1000 milliseconds (1 second). Returns self.
Parameter |
Type |
Description |
---|---|---|
port |
in port object |
The port to modify. |
newTimeout |
in number |
The read timeout in milliseconds. Must be in the interval [30..3000], either as a numeric value or as a constant (please see table below). |
self |
out port object |
The input port is returned as the output. |
Constant |
Value# |
---|---|
asi.READ_TIMEOUT_DEFAULT |
1000 |