I implemented my own NetworkStream port for Silverlight, which allows asynchronous calls.
I would like to read some JSON-RPC messages that I get from the server, so I decided to use JSON.NET JsonTextReader , so I got the following code:
reader = new JsonTextReader(new StreamReader(new NetworkStream(new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp))));
My problem is that it will try to perform a synchronous operation, which in turn simply throws an UnsupportedException .
Is there an asynchronous StreamReader that I can pass to JsonTextReader using? Should I use a different approach?
source share