aien-protocols-mv
Canonical specifications, wire protocols, and schemas for the AIEN sovereign ecosystem
Brought by drakestapleton
aien-protocols-mv / specs / osh-platform / vectors / s005_eof_after_drain.vec
| 1 | case eof_after_drain |
| 2 | kind positive |
| 3 | exec host-logic |
| 4 | domain any |
| 5 | needs streams |
| 6 | # end of stream only when every writer handle is closed and the bytes are drained (ST4.4) |
| 7 | create R W A => OK |
| 8 | dup W W2 A w => OK |
| 9 | write W "abc" => OK n=3 |
| 10 | close W => OK |
| 11 | read R 1 => OK n=1 data="a" |
| 12 | read R 8 => OK n=2 data="bc" |
| 13 | read R 8 => WOULD_BLOCK |
| 14 | close W2 => OK |
| 15 | read R 8 => OK n=0 |
| 16 | read R 8 => OK n=0 |
| 17 | close R => OK |
| 18 | check empty |