I am creating a Named Pipe to have my 64 bit app send requests to my 32 bit app (it must be this way, trust me).
The Listener part gets to the point where it's doing a StreamReader.ReadLine() and that's where it pauses to wait for input.
What I'd like is to set a timeout so the app can do the following
- check if the client has disconnected
- Terminate the program if he has
- go back to the readline if he has not.
my app will likely spend 90% of its time at this readline command, and so far, closing the client app without notifying the listener does not toss any exceptions. It just waits. Forever.
Is there a way to detect named pipes clients disconnecting? One might think there was an OnConnect and OnDisconnect event hook, but there is not.
I'd rather live with false hope than with false despair.