Added option to specify host and port