|
用winsocket测试
脚本如下:
r_start_transaction("EnterStage");
lrs_get_buffer_by_name("buf8", &buf, &size);
checkid = 2;
memcpy( buf + 24,(char*)&checkid,4);
lrs_set_send_buffer("socket1", buf, size);
lrs_send("socket1", "buf8", LrsLastArg);
lrs_free_buffer(buf);
lrs_receive("socket1", "buf9", LrsLastArg);
lrs_send("socket1", "buf10", LrsLastArg);
lrs_receive("socket1", "buf11", LrsLastArg);
lr_end_transaction("EnterStage", LR_AUTO);
lr_think_time(1);
lr_start_transaction("EnterRoom");
lrs_get_buffer_by_name("buf12", &sendBuf, &size);
checkid =4;
memcpy( sendBuf + 24,(char*)&checkid,4);
lrs_set_send_buffer("socket1", sendBuf, size);
lrs_send("socket1", "buf12", LrsLastArg);
lrs_free_buffer(sendBuf);
lrs_receive("socket1", "buf13", LrsLastArg);
lr_end_transaction("EnterRoom", LR_AUTO);
运行到lrs_send("socket1", "buf12", LrsLastArg);时报错 Error: An exception was raised while calling invocation function in interpreter extension cciext.dll: System Exceptions: EXCEPTION_ACCESS_VIOLATION.
但我把EnterStage这个事务处理删掉只处理EnterRoom时没有报错,单独处理EnterStage也不报错。
各位帮我看看这是什么原因? |
|