This method calls the NamedPipeClientStream.Connect(int) method with an infinite time-out value.
This method waits for a pipe instance to become available. erload:System.IO.Pipes.NamedPipeClientStream.Connect might return before NamedPipeServerStream.WaitForConnection is called from the System.IO.Pipes.NamedPipeServerStream object, but NamedPipeServerStream.WaitForConnection will not return until erload:System.IO.Pipes.NamedPipeClientStream.Connect has returned.
Any data written to the pipe after a System.IO.Pipes.NamedPipeClientStream object has connected, but before the server has called NamedPipeServerStream.WaitForConnection, will be available to the server following the call to NamedPipeServerStream.WaitForConnection.