|
求助录制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); 的时候就停住了 也不报错也不继续进行 张哥帮忙分析下原因吧 |
|