pre-add endOfTransmission to TCPConnection
add loops needs refactor