Add TLS support to tcp-server.