I have looked all over the Internet, but I cannot find the answer to the following question.
I have a C # /. NET instance NamedPipeClientStream in a client program, and the workflow calls NamedPipeClientStream.Read (byte [], int, int) to receive data from the server. The server sends data updates to the client.
Reading is a blocking call. If I want to close the client, is there a way to cancel / withdraw the Read call? I tried calling Close on the named pipe instance, but it does not affect the thread called Read.
I would think that there is a way to cancel the awakening. If not, it looks like this is a very poorly designed API because your program is in the power of the pipe.
Any information is appreciated.
-Chris
Chris source
share