goog_616 发表于 2014-2-12 15:45:01

录制win32脚本,第二次迭代时报错

#include "lrs.h"

Action()
{
    lr_think_time(44);

    lrs_create_socket("socket0", "UDP", "LocalHost=0",LrsLastArg);[出错的行数]

    lrs_send("socket0", "buf0", "TargetSocket=hshh.org:123", LrsLastArg);

    lrs_receive("socket0", "buf1", LrsLastArg);

    lrs_create_socket("socket1", "UDP", "LocalHost=0",LrsLastArg);

    lrs_send("socket1", "buf2", "TargetSocket=hshh.org:123", LrsLastArg);

    lrs_receive("socket1", "buf3", LrsLastArg);

    lr_think_time(6);

    lr_think_time(45);

        lrs_create_socket("socket2", "TCP", "RemoteHost=180.166.119.198:33770",LrsLastArg);

    lrs_send("socket2", "buf4", LrsLastArg);

    lrs_receive("socket2", "buf5", LrsLastArg);

    lrs_disable_socket("socket2", DISABLE_SEND);

    lrs_disable_socket("socket2", DISABLE_RECV);

    lrs_disable_socket("socket2", DISABLE_SEND_RECV);

    lrs_close_socket("socket2");

    lrs_create_socket("socket3", "TCP", "RemoteHost=180.166.119.198:33775",LrsLastArg);

    lrs_send("socket3", "buf6", LrsLastArg);

    lrs_receive("socket3", "buf7", LrsLastArg);

    lrs_send("socket3", "buf8", LrsLastArg);

    lrs_receive("socket3", "buf9", LrsLastArg);

    lrs_send("socket3", "buf10", LrsLastArg);

    lrs_receive("socket3", "buf11", LrsLastArg);

    lrs_send("socket3", "buf12", LrsLastArg);

    lrs_receive("socket3", "buf13", LrsLastArg);

    lrs_send("socket3", "buf14", LrsLastArg);

    lrs_receive("socket3", "buf15", LrsLastArg);

    lrs_send("socket3", "buf16", LrsLastArg);

    lrs_receive("socket3", "buf17", LrsLastArg);

    lrs_send("socket3", "buf18", LrsLastArg);

    lrs_receive("socket3", "buf19", LrsLastArg);

    lrs_send("socket3", "buf20", LrsLastArg);

    lrs_receive("socket3", "buf21", LrsLastArg);

    return 0;
}

提示信息如下:Error : socket0 - Invalid argument. Error code : 10022.
求指教!
页: [1]
查看完整版本: 录制win32脚本,第二次迭代时报错