2, 'Name'=>'cam2', 'Protocol'=>'http', 'Hostname'=>$host, 'Port'=>$port)); } check('ipv6 with port', srv('fd00::5', 8080)->Url(), 'http://[fd00::5]:8080'); check('ipv6 without port', srv('fd00::5', null)->Url(), 'http://[fd00::5]'); check('ipv6 with streaming port', srv('fd00::5', 8080)->Url(30002), 'http://[fd00::5]:30002'); check('bracketed ipv6', srv('[fd00::5]', 8080)->Url(), 'http://[fd00::5]:8080'); check('hostname', srv('cam2.example', 8080)->Url(), 'http://cam2.example:8080'); check('ipv6 zms url', srv('fd00::5', 8080)->UrlToZMS(), 'http://[fd00::5]:8080/cgi-bin/nph-zms'); exit($failures ? 1 : 0);