ocaml-multicore / picos

Interoperable effects based concurrency
https://ocaml-multicore.github.io/picos/doc/picos/index.html
ISC License
86 stars 3 forks source link

Add minimalist Cohttp implementation using `Picos_stdio` #220

Closed polytypic closed 2 months ago

polytypic commented 2 months ago

This PR adds minimalistic Cohttp Client and Server modules using picos.stdio for IO.

This also changes Picos_select to configure SIGPIPE to be ignored by default. This makes it easier to deal with cases where one end of a communication is closed before the other end is done.

This is definitely not a final solution, but I need a minimalistic HTTP client and don't have time to think through how to support more interesting use cases in the best way with Cohttp. Testing is also not very thorough at this point. In other words, improvements, including highly likely breaking changes, are left for future work.

Feedback from potential users is welcome!