this just does blocking/unblocking of Portal messages in a text stream. it uses null bytes as separators. in the future it will also support a digit string size header line for efficiency but it will still check for the null byte for robustness.
many options to this: immediate shutdown, soft shutdown, disk backing, recovery, etc.