Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

Asynchronous XmlReader

$
0
0
Hey all,
I want to develop a server that communicated with many clients. I want to use xml for the protocol (i.e. it will be a constant stream of elements asking the server to do various things, like in XMPP), processing each client with it's own XmlReader.
However, I've not found a way to use XmlReader asynchronously; I can only start each XmlReader in it's own thread since the Read() method blocks, which obviously doesn't scale very well.
I've had a look at the XmlLite and MSXML parsers as well as a few others, and none seem to have the ability to use overlapped i/o on the underlying handle. I've also tried using some hacks involving calling Read() only when I know there is a complete node available, but they were, well, hacks.
I'm at my wit's end here, it seems that the only option available to me is to write my own parser which seems kind of, well, pointless lol. Any ideas? The ideal solution would be a pair of BeginRead/EndRead methods on the XmlReader with a callback (i could impliment whatever solution you guys suggest as a pair of extension methods)
Thanks

Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>