Why does canceling a socket IInputStream::loadAsync operation close the socket? RRS feed

  • Question

  • I am using

     WinJS.Promise.timeout(timeout, stream.readAsync(buffer, 4096, partial))

    to read from a stream and cancel the operation, in case there is no data on the stream. This works, the method cancels the promise after a timeout, but this also closes the streams socket connection. Why is that? And how could I deal with it?

    Thursday, December 18, 2014 12:59 AM

All replies

  • As I know, it is by design and you need wait until the socket finish reading the whole stream.

    Friday, December 19, 2014 1:36 AM