05-09-2012 12:23 AM
When using ClientTCPRead() the response buffer contains responses from several prior ClientTCPWrite() commands. That is, the most recent response is concatenated onto a string containing several prior reponses.
Is there a way to clear the response buffer after each ClientTCPRead() so that only the response from the most recent request appears in the response buffer?
What happens if I issue several ClientTCPWrite() statements before the server issues a response? Will all the responses be contenated into one extended response? If the answer is yes, then this would explain why my response buffer has multiple response messages. How do I wait for a response before issuing another request?
05-09-2012 06:43 AM
The function basically reads the entire buffer and gives the output, If previous unread responses are there, they also being shown as concatenated strings. But you will find a termination character which separates different responses. You can parse the response string and read only the intended message.