Add unit tests for TcpConnection.
Try to connect to all endpoints returned by resolver.
Implement writing data to TCP connection.