|
恩 今天用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 编辑 ] |
|