tcp echo implemented in tcp_session (test code)