From 39fc84934d8ceb5cd91cf734fc294fa91673ab6c Mon Sep 17 00:00:00 2001 From: Philippe Pittoli Date: Mon, 15 May 2023 09:36:12 +0200 Subject: [PATCH] input2ipc: loop over input. --- crystal/src/input2ipc.cr | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/crystal/src/input2ipc.cr b/crystal/src/input2ipc.cr index 53beb6f..80f9455 100644 --- a/crystal/src/input2ipc.cr +++ b/crystal/src/input2ipc.cr @@ -1,5 +1,7 @@ # Input to IPC network packets. buffer = Bytes.new 1_000_000 -len = STDIN.read buffer -STDOUT.write_bytes len, IO::ByteFormat::BigEndian -STDOUT.write buffer[0.. len -1] +while true + len = STDIN.read buffer + STDOUT.write_bytes len, IO::ByteFormat::BigEndian + STDOUT.write buffer[0.. len -1] +end