CHRON-56 Refactor TCP layer