Closed tgiachi closed 9 years ago
Hello there is no need to loop to read more messages. At the decoder level you only decode the current message that has arrived. The job is to properly decode that message and let the decoder ready to handle the next message. Messages will keep coming to decoder as long as the app is running. I hope I have been a bit clear. I faced that problem too until I delved into the code to figure it out and the help of Jonas.
I believe you can close this issue.
In your example:
[..] if (_bytesLeft == 0) { _stream.Position = 0; var item = _serializer.Deserialize(new StreamReader(_stream), typeof (object)); MessageReceived(item); Clear();
[..]
How I can loop for read more messages?
thank you!