Resolves with bytes read from the stream. */ public function read(int $bytes = null, string $delimiter = null): Awaitable; /** * @param string $data * * @return \Interop\Async\Awaitable */ public function write(string $data): Awaitable; /** * @param string $data * * @return \Interop\Async\Awaitable */ public function end(string $data = ''): Awaitable; /** * Closes the stream and fails any pending reads or writes. */ public function close(); }