51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 1345|回复: 0
打印 上一主题 下一主题

[原创] socket协议中的参数化

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2012-2-18 00:35:56 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Action()
{
  char ParamBuf[74]= "0001331000110101101201202161039272012022000001116378820120208164930111492";
    char ParamBuf1[21] = "20120220999000021231";

    lrs_create_socket("socket1","TCP","RemoteHost=123.125.55.210:8081",LrsLastArg);

        lrs_save_param_ex("socket1","user",(char *)&ParamBuf,0,73,"ascii","xieyi_param");
        lrs_save_param_ex("socket1","user",(char *)&ParamBuf1,0,20,"ascii","dingdan_param");

        lr_start_transaction("zhifu");
               
    lrs_send("socket1", "buf0", LrsLastArg);
    lrs_receive("socket1", "buf1", LrsLastArg);

    lrs_close_socket("socket1");

        return 0;
}



;WSRData 2 1

        send buf0 133  
        "<xieyi_param>"
        "<dingdan_param>"
        "\x33\x30\x31\x30\x30\x39\x30\x30\x30\x30\x30\x30\x30\x31\x30"
        "\x30\x31"
        "\x31\x30"
        "\x31\x30\x30\x30\x30\x30\x30\x32\x30\x39\x37\x38\x37\x31\x39"

        recv buf1 139
        "\x30\x30\x30\x32\x33\x31\x39\x39\x39\x39\x39\x39\x39\x39\xD6\xA7\xB8\xB6\xB3\xC9\xB9\xA6\x32\x30\x31\x32\x30\x32\x32\x30\x30\x30\x30\x30\x31\x31\x31\x36\x33\x37\x38\x38\x32\x30\x31\x32\x30\x32\x31\x36\x31\x30\x33\x39\x30\x38"                 "\x32\x30\x31\x32\x30\x32\x31\x36\x31\x30\x33\x39\x30\x38\x32\x30\x31\x32\x30\x32\x32\x30\x39\x39\x39\x30\x30\x30\x30\x32\x31\x32\x33\x31"
        "\x31\x30"
        "\x31\x30\x35"
        ""
        ""
        ""
        "\x43\x43\x42\x5F\x51\x43\x4B"
        "\x36\x32\x32\x37\x30\x30\x30\x30\x31\x30\x39\x30\x30\x31\x37\x38\x39\x37\x33"
        "\x30\x30\x30\x30\x30\x30"
        "\x31\x30\x35\x31\x31\x30\x30\x37\x33\x39\x39\x31\x33\x30\x35"
-1




希望对ParamBuf和ParamBuf1中的部分字符串参数化,直接对部分字符串参数化,提示“too many initializers”,请问有什么办法能够解决该问题,谢谢
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-11-25 04:34 , Processed in 0.062615 second(s), 24 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表