input2ipc: loop over input.

tmp
Philippe Pittoli 2023-05-15 09:36:12 +02:00
parent 1435515898
commit 39fc84934d
1 changed files with 5 additions and 3 deletions

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