|
用winsocket协议录制一个链接服务器,然后发送数据到服务器的操作
录制到的脚本是:
lrs_create_socket("socket0", "TCP", "LocalHost=0", "Backlog=1", LrsLastArg);
lrs_create_socket("socket1", "TCP", "LocalHost=0", "RemoteHost=daisy:9583", LrsLastArg);
lrs_accept_connection("socket0", "socket2");
lrs_create_socket("socket3", "TCP", "LocalHost=0", "RemoteHost=10.200.1.10:1223", LrsLastArg);
lrs_send("socket3", "buf0", LrsLastArg);
lrs_receive("socket3", "buf1", LrsLastArg);
lrs_send("socket3", "buf2", LrsLastArg);
lrs_receive("socket3", "buf3", LrsLastArg);
lrs_send("socket3", "buf4", LrsLastArg);
lrs_send("socket1", "buf5", LrsLastArg);
lrs_receive("socket3", "buf6", LrsLastArg);
lrs_receive("socket2", "buf7", LrsLastArg);
lrs_receive("socket3", "buf8", LrsLastArg);
lrs_send("socket3", "buf9", LrsLastArg);
lrs_receive("socket3", "buf10", LrsLastArg);
lrs_send("socket3", "buf11", LrsLastArg);
lrs_send("socket1", "buf12", LrsLastArg);
lrs_receive("socket3", "buf13", LrsLastArg);
lrs_receive("socket2", "buf14", LrsLastArg);
lrs_send("socket3", "buf15", LrsLastArg);
lrs_receive("socket3", "buf16", LrsLastArg);
lrs_send("socket1", "buf17", LrsLastArg);
lrs_send("socket3", "buf18", LrsLastArg);
lrs_receive("socket3", "buf19", LrsLastArg);
lrs_receive("socket2", "buf20", LrsLastArg);
回放的时候总是回放错误:
正在开始操作 vuser_init。
vuser_init.c(12): lrs_create_socket(socket0, TCP, ...)
vuser_init.c(14): lrs_create_socket(socket1, TCP, ...)
vuser_init.c(16): lrs_accept_connection(socket0, socket2)
vuser_init.c(16): 错误: 尝试 accept connection 的超时时间已到。错误代码: 9017。
本身链接到服务器是可以的,回放为什么老出错呢? |
|