0
Answer

Close an HTTPListenerResponse.OutputStreram

George George

George George

16y
1.9k
1

Hello everyone,


1.

When we close the HTTPListenerResponse.OutputStreram (using Close method, when complete writing content from server side), I think in the internal of CLR, there should be some flush work during Close method (I do not think each time when we write to the stream, data will be flushed immediately).

But the return type of Close is void and there is no exception thrown from Close from MSDN document for Close method, if Close fail, and means data is corrupted -- flush of data failed. How could we detect this situation?

2.

Any best practices to solve the issue when program server side code?


thanks in advance,
George