求助录制socket协议C/S脚本回放时的问题
求助录制socket协议C/S脚本回放时的问题下面是我录制的脚本
#include "lrs.h"
Action()
{
lrs_create_socket("socket0", "UDP",LrsLastArg);
lrs_send("socket0", "buf0", "TargetSocket=192.168.0.255:5400", LrsLastArg);
lrs_create_socket("socket1", "UDP", "LocalHost=5400",LrsLastArg);
lrs_receive("socket1", "buf1", LrsLastArg);
lrs_create_socket("socket2", "TCP", "LocalHost=5400", "Backlog=2147483647",LrsLastArg);
lrs_accept_connection("socket2", "socket3");
lrs_receive("socket1", "buf2", LrsLastArg);
lrs_create_socket("socket4", "TCP", "RemoteHost=M87ENG:5400",LrsLastArg);
lrs_receive("socket1", "buf3", LrsLastArg);
lrs_send("socket0", "buf4", "TargetSocket=192.168.0.255:5400", LrsLastArg);
lrs_receive("socket1", "buf5", LrsLastArg);
lrs_send("socket0", "buf6", "TargetSocket=192.168.0.255:5400", LrsLastArg);
lrs_receive("socket1", "buf7", LrsLastArg);
lrs_send("socket0", "buf8", "TargetSocket=192.168.0.255:5400", LrsLastArg);
lrs_receive("socket1", "buf9", LrsLastArg);
lrs_accept_connection("socket2", "socket5");
lrs_receive("socket1", "buf10", LrsLastArg);
lrs_send("socket0", "buf11", "TargetSocket=192.168.0.255:5400", LrsLastArg);
lrs_receive("socket1", "buf12", LrsLastArg);
lrs_send("socket0", "buf13", "TargetSocket=192.168.0.255:5400", LrsLastArg);
lrs_receive("socket1", "buf14", LrsLastArg);
lrs_close_socket("socket5");
lrs_close_socket("socket4");
lrs_close_socket("socket3");
lrs_close_socket("socket2");
lrs_receive("socket1", "buf15", LrsLastArg);
return 0;
}
回放的时候到 lrs_receive("socket1", "buf1", LrsLastArg); 的时候就停住了 也不报错也不继续进行张哥帮忙分析下原因吧
本地端口没有屏蔽完全
在F4 RunnerTime Setting设置中 设置忽略本地端口:格式好象就是:LocalHost 还有 M87ENG:* 应该没有问题 然后在看看 Data.ws 中的BUF有没有没有用处的端口 然后给注释掉 就OK了 8.0 中 能设置忽略本地端口?怎样在C/S中设置关联,也是用web_reg_sava_param?
[ 本帖最后由 liujinkui 于 2009-9-1 17:44 编辑 ] 顶一下。 windows sockets关联用lrs_save_param()和lrs_save_search_string()函数 云层老师,
lrs_create_socket("socket0", "TCP", "LocalHost=0", "RemoteHost=localhost:8000", LrsLastArg);
vuser_init.c(24): Error : callConnect - Connection refused. Error code : 10061.
vuser_init.c(24): Error : Timeout expired while trying to connect. Error code : 9017
上面这个错误是端口变化导致的吗?,我想关联应怎么样做呢? :D :D :D :D 回复 6# liujinkui
我也遇到这个问题,请问您后来是怎么解决的?10061和9017 哎、、、、、纠结 回复 5# 云层
陈老师,这个咋整。。。
页:
[1]