Quick hardening of my old netstring reader for use with a socket. Untested.