|
录制协议winsock,部分脚本如下
......
action
{
......
lrs_receive("socket3", "buf15", LrsLastArg);
lrs_save_param("socket3",NULL,"newsession",179,19);
lr_output_message ("param1: %s", lr_eval_string("<newsession>"));
lrs_send("socket3", "buf16", LrsLastArg);
.....
}
data.ws相应内容如下
recv buf15 485
"RTSP/1.0 200 OK\r\n"
"Server: DSS/5.5 (Build/489.7; Platform/Linux; Release/Darwin; )\r\n"
"Cseq: 2\r\n"
"Last-Modified: Thu, 22 Dec 2005 01:59:56 GMT\r\n"
"Cache-Control: must-revalidate\r\n"
"Session: 9038866718986614852\r\n"
"Date: Thu, 22 Dec 2005 02:11:28 GMT\r\n"
"Expires: Thu, 22 Dec 2005 02:11:28 GMT\r\n"
"Transport: RTP/AVP;unicast;source=192.168.0.7;client_port=6972-6973;server"
"_port=6970-6971;ssrc=65573F92\r\n"
"x-Transport-Options: late-tolerance=2.900000\r\n"
"x-Retransmit: our-retransmit\r\n"
"x-Dynamic-Rate: 1;rtt=13\r\n"
"\r\n"
send buf16 213
"PLAY rtsp://192.168.0.7:554/bbb.3gp RTSP/1.0\r\n"
"CSeq: 3\r\n"
"Range: npt=0.000000-134.200000\r\n"
"x-prebuffer: maxtime=2.000000\r\n"
"Session: 9038866718986614852\r\n"
"User-Agent: QTS (qtver=6.5.1;os=Windows NT 5.0Service Pack 4)\r\n"
"\r\n"
收到的buf15中的Session: 9038866718986614852通过 lrs_save_param("socket3",NULL,"newsession",179,19);保存在<newsession>中。请问如何用<newsession>替换发送至服务器的buf16中"Session: 9038866718986614852\r\n"的session号? |
|