Stream.readAllAsync()

DESCRIPTION

Read exactly the specified amount of bytes asynchronously.

Closure is invoked with a success indication when all bytes are read. Or an error if all bytes could not be read (EOF or an error occurs or stream is stopped).

DECLARATION

    public func readAllAsync(length: Int, closure: @escaping AsyncDataReceiver) 

PARAMETERS

length:
The number of bytes to read
closure:
Invoked when the operation completes, see synchronous readAll() for possible errors.