|
参看回放的日志,buf3是正常的,因为录制时候也有222的情况,但是buf5和buf9在录制的时候不会出现,
只有回放时才收到这么少的字节数.
感觉这是个问题,却不知道从哪里下手.
录制的这个应用非常简单,就是一个登录医疗系统的过程,协议是TCP/IP,C/S结构,VC++开发的.
有经验的帮帮忙,随便给点建议开拓一下思路也好.
Action.c(15): lrs_get_received_buffer(socket0, buf_p, size_p)
Action.c(19): lrs_send(socket0, buf2)
Action.c(22): lrs_receive_ex(socket0, buf3)
Action.c(22): Mismatch (expected 223 bytes, 222 bytes actually received)
Action.c(23): lrs_get_received_buffer(socket0, buf_p, size_p)
Action.c(26): lrs_send(socket0, buf4)
Action.c(28): lrs_receive(socket0, buf5)
Action.c(28): Mismatch (expected 6559 bytes, 1082 bytes actually received)
Action.c(30): lrs_send(socket0, buf6)
Action.c(32): lrs_receive(socket0, buf7)
Action.c(34): lrs_send(socket0, buf8)
Action.c(36): lrs_receive(socket0, buf9)
Action.c(36): Mismatch (expected 5522 bytes, 43 bytes actually received)
=================
源代码还没有完全编完,也看看有没有好的建议吧.
char *buf1head;
int status=1,tt;
buf1head="wxx";
lr_start_transaction("Logon");
lrs_create_socket("socket0", "TCP", "LocalHost=0", "RemoteHost=GCQ-MED:16001", LrsLastArg);
lrs_send("socket0", "buf0", LrsLastArg);
//lrs_receive("socket0", "buf1", LrsLastArg);
lrs_receive_ex("socket0","buf1","NumberOfBytesToRecv=14698",LrsLastArg);
buf1head=lrs_get_received_buffer("socket0",0,4,NULL);
if (strnicmp("TTCS",buf1head,4)!=0)
status=0;
lrs_send("socket0", "buf2", LrsLastArg);
// lrs_receive("socket0", "buf3", LrsLastArg);
lrs_receive_ex("socket0","buf3","NumberOfBytesToRecv=223",LrsLastArg);
buf1head=lrs_get_received_buffer("socket0",0,4,NULL);
if (strnicmp("TTCS",buf1head,4)!=0)
status=0;
lrs_send("socket0", "buf4", LrsLastArg);
lrs_receive("socket0", "buf5", LrsLastArg);
lrs_send("socket0", "buf6", LrsLastArg);
lrs_receive("socket0", "buf7", LrsLastArg);
lrs_send("socket0", "buf8", LrsLastArg);
lrs_receive("socket0", "buf9", LrsLastArg);
lrs_send("socket0", "buf10", LrsLastArg);
if (status==0)
lr_end_transaction("Logon",LR_FAIL);
else
lr_end_transaction("Logon",LR_PASS);
[ 本帖最后由 Cinderella 于 2007-6-15 17:16 编辑 ] |
|