Address family not supported by protocol
Linux 2012/9/25 18:23:07 点击:不统计
在修改一个开源软件httpd_load过程中出现了Address family not supported by protocol 的错误
httpd_load是一个并发测试工具,主要是用到了请求外部url。
错误是在
connections[cnum].conn_fd = socket(
urls[url_num].sock_family, urls[url_num].sock_type,
urls[url_num].sock_protocol );
if ( connections[cnum].conn_fd < 0 )
{
perror( urls[url_num].url_str );
return;
}
链接socket的时候出现的。
后来查询代码以及赋值
查到对应的urls 内容是空,原来是设计数组的时候越界了。
后来更改的url数组索引测试OK了
转www.载for网站制作学习asp必.cn究
·上一篇:httpd_load并发顺序访问url >> ·下一篇:linux查看硬件信息 >>