51Testing软件测试论坛

标题: 执行WinSocket脚本时提示9011 Error Code [打印本页]

作者: 龙雨    时间: 2009-12-14 14:02
标题: 执行WinSocket脚本时提示9011 Error Code
脚本如下:
char *sendBuf=
        "<iq id='sddssdfsd’ type=’set’>"
                "<protocol>tcp</protocol>"
               "<user>"
                    "<ip_w>200.200.201.2</ip_w>"
                "</user>"
                "<storeid>122122221</storeid>"
            "</cmd>"
      "</iq>";
int len;
Action()
{
     int rc;
     rc=lrs_create_socket("socket0","TCP","LocalHost=0","RemoteHost=192.168.12.26:999",LrsLastArg);
     if (rc==0)
     {
           lr_output_message("Server connect is successful.");
           len=strlen(sendBuf);
           lrs_set_send_buffer("socket0",sendBuf,len);
           lrs_send("socket0","buf0",LrsLastArg);
           lrs_receive("socket0","buf1",LrsLastArg);
}
     else
    lr_output_message("Server connect is failed:%d",rc);
     lrs_close_socket("socket0");
return 0;
}
当运行到 lrs_receive("socket0","buf1",LrsLastArg);语句时,日志中显示如下错误代码:Action.c(32): Error : Specified buffer buf1 doesn't exist. Error code : 9011.。

被卡住了。请高手指教,THX!




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2