ReadAll
Reads all bytes from an io.Reader and stops a provided Timer.
def ReadAll(
r: io.Reader,
t: Timer
) - > []byte, error
Reads all bytes from the provided reader until an error or EOF, and stops the associated timer. This function is useful for consuming the entire content of an input stream while also managing a timer for the read operation.
Parameters
| Name | Type | Description |
|---|---|---|
| r | io.Reader | The input source from which to read all bytes. |
| t | Timer | The timer to be stopped once the read operation is complete, regardless of success or failure. |
Returns
| Type | Description |
|---|---|
[]byte, error | The bytes read from the reader and an error, if any occurred during the read operation. |