1st draft. text/binary protocol ready.