Added an option for specifying the host and port