alpha
Login
or
Join now
gazagnaire.org
/
ocaml-eio-net
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Eio network backends and test helpers
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
ocaml-eio-net
/
lib
/
mem
/
at
main
3 files
Thomas Gazagnaire
eio-net: connect to wildcard listeners in the mem backend
2w ago
11ee5a57
dune
eio-net: add in-memory network backend
1 month ago
eio_net_mem.ml
eio-net: connect to wildcard listeners in the mem backend
2 weeks ago
eio_net_mem.mli
eio-net: mem flow raises Eio.Io on write-after-close, not Failure A write to an in-memory mem flow whose send side is closed went through Eio.Buf_write.cstruct, which raises a bare Failure "cannot write to closed writer". A real Eio socket raises Eio.Io (Connection_reset ...) on write-after-reset (ECONNRESET/EPIPE), so adapter code that best-effort-catches Eio.Io on teardown behaved differently against the fake than against a real socket, forcing every adapter fuzzer to special-case the Failure. Detect the closed send side up front (Buf_write.is_closed holds exactly when cstruct would raise, and no write below suspends to race it) and raise a faithful Connection_reset carrying a new eio-net.mem backend code. copy goes through single_write, so it is covered too. The read path already matched a real socket: await_batch on a closed empty writer raises End_of_file. Pin all three with tests: write-after-peer-close and write-after-own-shutdown both raise Eio.Io Connection_reset (not Failure); read-after-peer-close drains buffered bytes then reaches End_of_file.
3 weeks ago