LoadRunner testing experience ftp mode

What is PASV mode (passive mode transfer)? How did he work?
FTP generally have two connections, one is a client process and server transfer command, the other

is the data transmission connection. General support for both FTP server program
Different modes, one is Port mode, one is Passive Mode (Pasv Mode).

 

Assume that the client is C, the server for the S.
Port Mode:
When a client C S connected to the server, using the Port mode, the client C sends a command to tell

the server S (the client C in the local open
N waiting for a port to connect your data), when the server S receives the Port command

will open to the client to connect to that port N,
The data connection is generated.
Pasv mode:
When a client C S connected to the server, the server S will send the information to the client C, this information is (S server opens a port in the local M, you are now
To connect to me), when the client C receives this message, you can end the service S,

M port to connect, the connection is successful, the data connection is also established.

 

Action()

{

   char acTest[100];

   char acTest2[100];

   char * pcTest3;

 

// Send the string generated

  sprintf(acTest,"ddddggg/r/n");

 

//Send the string specified

lrs_set_send_buffer("socket0", acTest, strlen(acTest));


// Sent, due to run until lrs_set_send_buffer, so here's "buf0" Invalid parameters

lrs_send("sccket0","buf0",LrsLastArg);

 

// Receiving the returned string

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


// The returned string into variables

pcTest3=lrs_get_received_buffer("socket0",0,-1,NULL);


// Returns string of data manipulation

if(pcTest3[0]=='k')

{

  lrs_set_send_buffer ("socket0", pcTest3, strlen(pcTest3));

  lrs_send("socket0", "buf0", LrsLastArg);

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

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值