2021-08-07 | Paul Boddie | raw annotate files changeset graph | Introduced support for pipe closure detection during directory listing production. This requires the reader endpoint to be propagated from the server to the client, with the capability being discarded in the server after having been sent using an operation completion function in the opener context. Simplified various reading and writing operations, removing loops that should be unnecessary: either a blocking read or write completes successfully or it runs short, indicating the closure of the pipe. Reorganised the directory reading test so that listing completion and early termination situations can be more easily tested. |
1 -- vim:set ft=lua: 2 3 local L4 = require("L4"); 4 5 local l = L4.default_loader; 6 7 local server = l:new_channel(); 8 9 l:startv({ 10 caps = { 11 server = server:svr(), 12 }, 13 log = { "server", "r" }, 14 }, 15 "rom/dstest_host_server", "10"); 16 17 l:startv({ 18 caps = { 19 server = server, 20 }, 21 log = { "client", "g" }, 22 }, 23 "rom/dstest_host_client", "rom/dstest_host.cfg", 1024, 1024);