51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 7016|回复: 6
打印 上一主题 下一主题

[原创] Action.c(6): Error : socket13 - Invalid argument. Error code : 10022.

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2007-7-6 11:40:54 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
脚本回放成功
加循环之后运行完脚本后失败
Action.c(6): Error : socket13 - Invalid argument. Error code : 10022.
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2007-7-6 12:53:57 | 只看该作者
Problem Description: Error: "socket<number> - Invalid argument. Error code : 10022" when creating a socket on the second iteration

A Winsock script replays fine on the first iteration, but has the following error during the second iteration on a lrs_create_socket statement:

"Action.c(x): Error : socket<num> - Invalid argument. Error code : 10022."

Diagnosis: This error indicates a failure to create a socket on the second iteration. This is because the socket is not closed on the first iteration.



--------------------------------------------------------------------------------

Solution: Verify that there is a corresponding lrs_close_socket statement in the Action section

Before creating a new socket, the old socket should be closed. This means that if you recorded a script into Vuser_init, Action, and Vuser_end sections, you need to make sure that the sockets that are opened in the Action section are also closed in the same section, because iterations only iterate the Action section.

Example:
The following code will cause a problem on socket 10 on the second iteration.

Action{
   ...
   lrs_create_socket("socket10" , "TCP", "LocalHost=0”…,LAST );
   ...
}

Vuser_end{
   lrs_close_socket("socket10");
   ...
}

As a resolution, close the socket at the end of the Action section.

Note:
You may need to move all the lrs calls before the lrs_close_socket statement in the Action section as well.

Example:
Action{
   ...
   lrs_create_socket("socket10" , "TCP", "LocalHost=0”…,LAST );
   ...
   lrs_close_socket("socket10");
   return 0;
}

[ 本帖最后由 shanxi 于 2007-7-6 12:55 编辑 ]
回复 支持 反对

使用道具 举报

该用户从未签到

3#
 楼主| 发表于 2007-7-6 13:31:17 | 只看该作者
3ks!sdlkfj3
回复 支持 反对

使用道具 举报

该用户从未签到

4#
 楼主| 发表于 2007-7-6 13:34:41 | 只看该作者
我想问问
你的这些英文资料是自己写的还是
在哪里找的啊?
如果是找的,方便透露一下网址吗?
回复 支持 反对

使用道具 举报

该用户从未签到

5#
发表于 2010-10-20 11:07:28 | 只看该作者
确实是,录脚本的时候没注意这个。
回复 支持 反对

使用道具 举报

该用户从未签到

6#
发表于 2011-12-2 13:26:42 | 只看该作者
遇到这个问题了,回去检查脚本,就是缺少lrs_close_socket()引起的,补充完整后,就可以了。

灰常感谢楼主
回复 支持 反对

使用道具 举报

该用户从未签到

7#
发表于 2012-5-17 11:41:13 | 只看该作者
3Q,今天刚好又遇到这个问题了
回复 支持 反对

使用道具 举报

本版积分规则

关闭

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

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

GMT+8, 2024-9-23 13:19 , Processed in 0.093022 second(s), 28 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

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