|
上网找了解决方法(三个方法已经注释),不知道是使用问题还是函数本身不能解决。脚本如下:
lrs_create_socket("socket0", "TCP", "RemoteHost=BONSON-UXG8YPMV:1433", LrsLastArg);
lrs_send("socket0", "buf0", LrsLastArg);
lrs_receive("socket0", "buf1", LrsLastArg);
lrs_send("socket0", "buf2", LrsLastArg);
lrs_receive("socket0", "buf3", LrsLastArg);
lrs_send("socket0", "buf4", LrsLastArg);
//lrs_set_receive_option(EndMarker, StringTerminator , "\r\n"); //读取直到"\r\n"符号出现 .
// lrs_set_receive_option(EndMarker, BinaryStringTerminator , "\\X00"); //读取直到二进制符号"\\X00"出现
// lrs_set_receive_option(EndMarker, EndMarker_None );
lrs_receive("socket0", "buf5", LrsLastArg);
上面的三个注释的那个函数都试过了。我是这么用的,不知道行不行。回放日志:Action.c(28): Mismatch (expected 59 bytes, 0 bytes actually received)
Action.c(31): lrs_send(socket0, buf6)
Action.c(33): lrs_receive(socket0, buf7)
Action.c(33): 错误: socket0 - 软件造成连接终止。错误代码: 10053
可怎么解决了呀!另外我录制的程序出现上面的问题时直接中止
Action.c(24): Mismatch (expected 51 bytes, 0 bytes actually received)
Action.c(26): lrs_send(socket0, buf6)
Action.c(28): lrs_receive(socket0, buf7)
Action.c(28): 错误: socket0 - 软件造成连接终止。错误代码: 10053。
[ 本帖最后由 pinglr 于 2010-1-19 15:31 编辑 ] |
|