HttpListener
I'm currently writing an extreme lightweight HTTP server in PowerShell script(which very obviously utilizes the .NET framework). I want to figure out how to check if a connection is still alive before dispatching the response with HttpListenerResponse.Close(), because if i try to write to a dead connection it obviously throws errors, and i'd like to handle this gracefully before the catch block needs to trigger