CHRON-56 Refactor TCP layer, fix build