JanetDocsSourcePlaygroundTutorialsI'm Feeling luckyCommunityGitHub sign in

ev/read

core-api


    cfunction
    src/core/ev.c on line 3480, column 1

    (ev/read stream n &opt buf timeout)

    Read at most `n` bytes into a buffer asynchronously from a stream. 
    `n` can also be `:all` to read into the buffer until end of stream. 
    Optionally provide a buffer, `buf`, to write into and `timeout` in 
    seconds after which to cancel the operation and raise an error. 
    Returns the buffer if the read was successful or nil if 
    end-of-stream reached. Raises an error if there were problems with 
    the IO operation.


0 examplesSign in to add an example
Loading...