0
我想檢查連接是否仍然打開。如果不是,我會停止這個過程。如何檢查HttpListenerRequest連接是否仍然打開?
//Process request code goes here
while (!isComplete) {
//Check HttpListenerRequest if connection is still open...
if (IsTimedOut && !timeoutTriggered)
{
timeoutTriggered = triggerTimeout();
}
Thread.Sleep(100);
}
stopWatch.Stop();
//Process response code goes here
我該怎麼做?
問題根本不明確,請創建https://stackoverflow.com/help/mcve –