libipc-examples/crystal/src/fromipc.cr

5 lines
144 B
Crystal

# Read an IPC network packet and remove the first 4 bytes.
buffer = Bytes.new 1_000_000
len = STDIN.read buffer
STDOUT.write buffer[4.. len -1]