Add support for TCP connection timeout and to terminate on Kill()