Added support for TCP connections.