Menu

Is it possible to use NetworkStream ?

2006-12-04
2013-04-22
  • Nobody/Anonymous

    Hi,

    I try to use a NetworkStream, but I get an error because of Position property and Stream Length property too.

    So is it possible ?

    Thanks.

     
    • Angel Marin

      Angel Marin - 2006-12-06

      You can't use NetworkStream directly as it won't allow seeking back and forth to do the parsing. And anyway it wouldn't be a good idea as any network issue (timeout, connection reset, ...) would break parsing. You should just write it to a MemoryStream or a FileStream and then do the parsing.

       

Log in to post a comment.

MongoDB Logo MongoDB