|
3#
楼主 |
发表于 2009-8-25 11:16:50
|
只看该作者
回复 2# 的帖子
这位大哥您好!
帮忙看下,先谢谢了!
以下是我的脚本
#include "lrs.h"
vuser_init()
{
lrs_startup(257);
lrs_create_socket("socket0", "TCP", "LocalHost=0", "Backlog=50", LrsLastArg);
lrs_create_socket("socket1", "TCP", "LocalHost=0", "Backlog=50", LrsLastArg);
lrs_create_socket("socket2", "TCP", "LocalHost=2296", "Backlog=50", LrsLastArg);
lrs_create_socket("socket3", "TCP", "LocalHost=0", "Backlog=50", LrsLastArg);
lr_think_time(43);
lrs_create_socket("socket4", "TCP", "LocalHost=0", "RemoteHost=lenovoW-2395031:2296", LrsLastArg);
lrs_accept_connection("socket2", "socket5");
lrs_send("socket4", "buf0", LrsLastArg);
lrs_receive("socket5", "buf1", LrsLastArg);
lrs_send("socket5", "buf2", LrsLastArg);
lrs_receive("socket4", "buf3", LrsLastArg);
lrs_close_socket("socket4");
lrs_create_socket("socket6", "TCP", "LocalHost=0", "RemoteHost=lenovoW-2395031:2296", LrsLastArg);
lrs_accept_connection("socket2", "socket7");
lrs_send("socket6", "buf4", LrsLastArg);
lrs_receive("socket7", "buf5", LrsLastArg);
lrs_send("socket6", "buf6", LrsLastArg);
lrs_receive("socket7", "buf7", LrsLastArg);
lrs_receive("socket6", "buf8", LrsLastArg);
lrs_send("socket7", "buf9", LrsLastArg);
lrs_send("socket6", "buf10", LrsLastArg);
lrs_receive("socket7", "buf11", LrsLastArg);
lrs_send("socket6", "buf12", LrsLastArg);
lrs_receive("socket7", "buf13", LrsLastArg);
lrs_send("socket7", "buf14", LrsLastArg);
lrs_receive("socket6", "buf15", LrsLastArg);
lrs_send("socket7", "buf16", LrsLastArg);
lrs_receive("socket6", "buf17", LrsLastArg);
lrs_send("socket6", "buf18", LrsLastArg);
lrs_receive("socket7", "buf19", LrsLastArg);
lrs_send("socket6", "buf20", LrsLastArg);
lrs_receive("socket7", "buf21", LrsLastArg);
lrs_create_socket("socket8", "TCP", "LocalHost=0", "RemoteHost=lenovoW-2395031:2297", LrsLastArg);
lrs_accept_connection("socket3", "socket9");
lrs_send("socket8", "buf22", LrsLastArg);
lrs_receive("socket9", "buf23", LrsLastArg);
lrs_send("socket9", "buf24", LrsLastArg);
lrs_receive("socket8", "buf25", LrsLastArg);
lrs_close_socket("socket9");
lrs_receive("socket8", "buf26", LrsLastArg);
lrs_close_socket("socket8");
lrs_create_socket("socket10", "TCP", "LocalHost=0", "RemoteHost=lenovoW-2395031:2297", LrsLastArg);
lrs_accept_connection("socket3", "socket11");
lrs_send("socket10", "buf27", LrsLastArg);
lrs_receive("socket11", "buf28", LrsLastArg);
lrs_send("socket11", "buf29", LrsLastArg);
lrs_receive("socket10", "buf30", LrsLastArg);
lrs_send("socket11", "buf31", LrsLastArg);
lrs_receive("socket10", "buf32", LrsLastArg);
return 0;
}
#include "lrs.h"
Action()
{
lr_think_time(39);
lrs_create_socket("socket12", "TCP", "RemoteHost=CAIT-SHENZHEN:8080", LrsLastArg);
lrs_send("socket12", "buf33", LrsLastArg);
lrs_receive("socket12", "buf34", LrsLastArg);
lr_think_time(6);
lrs_send("socket12", "buf35", LrsLastArg);
lrs_receive("socket12", "buf36", LrsLastArg);
lrs_send("socket12", "buf37", LrsLastArg);
lrs_receive("socket12", "buf38", LrsLastArg);
return 0;
}
#include "lrs.h"
vuser_end()
{
lr_think_time(12);
lrs_send("socket12", "buf39", LrsLastArg);
lrs_receive("socket12", "buf40", LrsLastArg);
lrs_cleanup();
return 0;
} |
|