I'm working with the Azure Relay Service at the moment and faced a problem handling the stream. I need to use this service in a synchronous way as it is required by the software which will use this implementation.
I'm opening a stream to the service and reading the data from it with StreamReader()
, works fine. But now I must leave the StreamReader without closing the underlying stream as I have to send an answer back to the sender.
The problem is, that I can't leave the StreamReader()
without closing the underlying stream and its not posible to reopen the stream to send an answer back.
Any ideas how to solve this problem?
Thanks for your help.