read function

  1. @Native<Long Function(Int, Pointer<Void>, Size)>(Int, Pointer<Void>, Size)>(isLeaf: true)
int read(
  1. int fd,
  2. Pointer<Void> buf,
  3. int count
)

read(2): reads at most count bytes of fd into buf; how many, 0 at the end, or -1. A leaf call: read only what is there (after poll, or as many as fionread says), or it blocks the isolate's thread.

Implementation

@Native<Long Function(Int, Pointer<Void>, Size)>(isLeaf: true)
external int read(int fd, Pointer<Void> buf, int count);