input2ipc: loop over input.

This commit is contained in:
Philippe Pittoli 2023-05-15 09:36:12 +02:00
parent 1435515898
commit 39fc84934d

View File

@ -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