new io sketch

a hacky sketch of a TCP API (second commit) based on the old IO and using wrappers.