I have implemented a server/client test rig that uses streamed transfer mode with a net.pipe binding. This is all kind of working however I am hitting an issue when the actual server's stream implementation blocks on an empty buffer. Even if i remove all synchronization, set the concurrency mode to multiple I am having an issue where my client application is blocking on stream.Read.
So my client initiates a connection to the server with a "GetStream" call (on a non-UI thread), the actual stream implementation that's returned by the server is a blocking stream (say NetStream for example) so it will block when there are no bytes available to read. This is causing a complete lockup of the service host so now the client cannot make any further calls until the stream.read operation unblocks.
Can someone shed some light on this behavior?