使用winsock协议录制,在回放的时候,响应时间会很慢。主要是因为录制时recv_buff接收的内容和回放时的内容不一致,系统会自动去检查。
解决办法:在程序中添加一个函数:lrs_set_recv_timeout2(0,0),这样系统就不去检查回收的内容是否一致了。
介绍两个函数:
1. lrs_set_recv_timeout(sec,microsec)
The function sets the period of time that Vugen waits to receive expected data from a socket.
默认值=10s
2. lrs_set_recv_timeout2(sec,microsec)
The function sets a timeout limit for receiving data on a socket。When lrs_receive receives the data buffer, it compares its size with the expected data. If the buffer size does not match, it performs additional iterations and rereads the incoming socket data, until the timeout2 limit is reached.