标题: LoadRunner:Getting values from Winsock Buffers [打印本页] 作者: pcl2004_27 时间: 2006-10-30 14:10 标题: LoadRunner:Getting values from Winsock Buffers Description
How to grab values identified by the \ null character while using Winsock.
Solution
While using the Web/Winsock or plain Winsock method it becomes an issue to capture the right values from the send/rcvd buffers. However, some ansi c functions come in to play and help one out accomplishing the task.
Lets say if you have a value which you are receiving in buf88 you have captured the offset and defined the string length accurately. Now, you want to get rid of the junk characters around it and put it in a variable.
Here is how we do it:
// In code below we are verifying if the buffer is coming back with customer id and we are resolving that through the code.