|
最近为此事困扰了几天了,还请高手支援,先谢了.
用Loadrunner中socket协议测试,buf20接收服务器传送的动态sessionID,在action中在buf20之后做了关联:
action:
lrs_receive("socket3", "buf20", LrsLastArg); //接收session
lrs_save_searched_string("socket3", LRS_LAST_RECEIVED, "session", "LB/BIN=Session: ", "RB/BIN=;timeout", 1, 0, -1);
lrs_close_socket("socket3");
lrs_create_socket("socket4", "TCP", "RemoteHost=LTDB:9105", LrsLastArg);
lrs_send("socket4", "buf21", LrsLastArg);//依据session向服务器发送请求
data.ws
recv buf20 197
"RTSP/1.0 200 OK\r\n"
"Range: npt=0-274248\r\n"
"CSeq: 0\r\n"
"Transport: Transport: RTP/AVP/TCP;unicast;server_port=9105;ssrc=671690388;"
"mode=PLAY\r\n"
"Session: 335544858;timeout=300\r\n"
"Server: BREWServer/1.0.0.0000\r\n"
"\r\n"
send buf21 8
"\x80\x01\x04\x00\x1a\x02\x00\x14"
其中send buf21中的\x1a\x02\x00\x14便session:335544858
疑问,如何将关联语句中的参数{session}传递给lrs_send("socket4", "buf21", LrsLastArg)中的buf21?仅data.ws中对应的后四字节,以向服务器请求动态的session,而不是固定的session:335544858.
以上还请帮助解答,再次感谢. |
|