Skip to content

Eio: Use buffered IO#19

Merged
Julow merged 11 commits into
mainfrom
eio_buf_read
Jun 19, 2025
Merged

Eio: Use buffered IO#19
Julow merged 11 commits into
mainfrom
eio_buf_read

Conversation

@Julow

@Julow Julow commented Jun 18, 2025

Copy link
Copy Markdown
Member

Translate some Lwt_io and Lwt_unix functions to Eio Buf_read and Buf_write.

Julow added 11 commits June 18, 2025 18:23
And correctly open `Eio.Std` to add `r` to the scope.
This created a `fun` accepting the optional arguments instead of erasing
them.
There's no easy way for opening a `Flow` through a `Eio_unix.Fd.t`.
Instead, use `Eio_unix.Net.import_socket_stream` to create a `Flow` from
a `Unix.file_descr` directly.
Construct values of `Eio.Buf_read.t` and `Eio.Buf_write.t` when
converting `Lwt_io` code to Eio.

Code using `Lwt_io.read_into` is in-between using unbuffered and
buffered IO and should be changed. A comment is inserted.
@Julow Julow changed the title WIP: Eio buffered IO Eio: Use buffered IO Jun 19, 2025
@Julow

Julow commented Jun 19, 2025

Copy link
Copy Markdown
Member Author

This was used in ocsigen/ocsigenserver#269

@Julow
Julow merged commit 98827ed into main Jun 19, 2025
@Julow
Julow deleted the eio_buf_read branch July 4, 2025 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant