ts refactor #0

With a focus on the "client" TCP and SOCKs implementation and a free tcp echo server.