码迷,mamicode.com
首页 > 其他好文 > 详细

[weird problem] the xm file transfered by wcf,some sections in it were always repeated

时间:2014-09-01 15:19:03      阅读:279      评论:0      收藏:0      [点我收藏+]

标签:os   io   ar   cti   sp   on   c   size   ad   

some sections in xml are always repeated,I received these file by wcf.

I thought it‘s caused by buffersize of wcf or flush method of stream.(I don‘t what meaning of flush method is)

it took me about an half day to find cause of this probelm.and now,I find it‘s because I close stream in another thread.

why close stream in another stream?

I intended to visit property of stream in another thread,but system throw exption somtimes because the stream was closed.so I closed stream after visited property of stream.

the resolution is if canread is true then visit property in another stream and close stream in current thread.that‘s right.

 

[weird problem] the xm file transfered by wcf,some sections in it were always repeated

标签:os   io   ar   cti   sp   on   c   size   ad   

原文地址:http://www.cnblogs.com/langu/p/3949158.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!