phasync
Manual / Streams and files

Manual

Streams and files

PSR-7 streams, multipart bodies, and file functions that let others run.

Introduction#

phasync's PSR-7 implementation (Request, Response, ServerRequest, Uri) is the same shape as any other, with StringStream, BufferedStream and UnbufferedStream for the body and MultipartStream for a multipart/form-data upload. A file function such as fread() or fwrite() blocks the process on its own; see Waiting and timeouts for what lets it wait without doing that instead.

Examples#

Reference#