Both Lrs_set_recv_timeout and Lrs_set_recv_timeout2 are used to set the receive timeout for sockets, but not for the time-out objects.
- Lrs_set_recv_timeout: After executing the lrs_receive command, wait for the server to return the message timeout, that is, the response time of the server.
- LRS_SET_RECV_TIMEOUT2: The connection was created successfully, and after receiving the message returned by the server, the time-out for matching messages is obtained. When the lrs_receive receives the data, it is compared to the expected length of the data, and if the length does not match, it will re-read the data from the socket until it times out.
For example:
lrs_ Create_socket ( "Socket2" , "TCP" , "remotehost= Tears.mercury.co.il:23 " lrs_send ( , "Buf2" lrs_set_recv_timeout (120,0); lrs_set_recv_timeout2 (10,0); lrs_receive ( , "buf3" |
Differences between Lrs_set_recv_timeout and Lrs_set_recv_timeout2 in LoadRunner