51Testing软件测试论坛
标题:
新手请教WINSOCKET的10013问题解决?
[打印本页]
作者:
dcfs08
时间:
2008-10-28 11:22
标题:
新手请教WINSOCKET的10013问题解决?
恩 今天用WINSOCKET录制了IPMSG,但是在回放中报了10013错误.
我知道查了查资料说:"试图使用被禁止的访问权限访问套接字.如:在没有使用函数setsockopt()的so_broadcast命令设置广播权限的套接字上使用一个广播地址发送数据.
请问:咋解决这个问题??
附脚本和错误日志:
---------------------------------------------------------------------------
vuser_init()
{
lrs_startup(257);
lrs_create_socket("socket0", "UDP", "LocalHost=2425", LrsLastArg);
lrs_create_socket("socket1", "TCP", "LocalHost=2425", "Backlog=5", LrsLastArg);
lrs_send("socket0", "buf0", "TargetSocket=255.255.255.255:2425", LrsLastArg);
lrs_receive("socket0", "buf1", LrsLastArg);
lrs_send("socket0", "buf2", "TargetSocket=192.168.160.255:2425", LrsLastArg);
lrs_receive("socket0", "buf3", LrsLastArg);
lrs_send("socket0", "buf4", "TargetSocket=XXXXXXX.xa.dcfs.digitalchina.com:2425", LrsLastArg);
lrs_receive("socket0", "buf5", LrsLastArg);
lrs_send("socket0", "buf6", "TargetSocket=192.168.160.255:2425", LrsLastArg);
lrs_receive("socket0", "buf7", LrsLastArg);
lrs_send("socket0", "buf8", "TargetSocket=XXXXXXX.xa.dcfs.digitalchina.com:2425", LrsLastArg);
lrs_receive("socket0", "buf9", LrsLastArg);
return 0;
}
错误:
Virtual User Script started
Starting action vuser_init.
vuser_init.c(12): lrs_startup(257)
vuser_init.c(14): lrs_create_socket(socket0, UDP, ...)
vuser_init.c(16): lrs_create_socket(socket1, TCP, ...)
vuser_init.c(18): lrs_send(socket0, buf0)
vuser_init.c(18): Error : socket0 - Permission denied. Error code : 10013.
Abort was called from an action.
---------------------------------------------------------------------------
[
本帖最后由 dcfs08 于 2008-10-28 11:24 编辑
]
作者:
dcfs08
时间:
2008-10-28 11:25
再次谢过各位DD们
作者:
dcfs08
时间:
2008-10-28 12:14
嗯 有人知道这个咋解决么??
作者:
dcfs08
时间:
2008-10-28 15:05
自己顶起来
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2