Hello,
I have written a sample async code (using callback/async).
I am now seeing a situation where-in if two messages are received at
the same-time, both of them show-up in the data-buffer.
Given that i am new to this, can you point to resources or suggest
ways to handle this scenario? (the program runs indefinitely, handling
messages as they come in).
Here is the statement that stores the incoming bytes into a string:
myCompleteMessage = String.Concat(myCompleteMessage,
Encoding.ASCII.GetString(m_DataBuffer, 0, bytesRead));
Note that m_DataBuffer is a byte-array //byte[] m_DataBuffer = new
byte[20000];
There is 'content-length' field in the data that i get, but not sure
how to go-about handling both (or multiple) messages.
Thanks for your time.
Regards,
RS