System.IO.Pipes.NamedPipeClientStream.Connect Method

Connects to a waiting server within the specified time-out period.

Syntax

public void Connect (int timeout)

Parameters

timeout
The number of milliseconds to wait for the server to respond before the connection times out.

Remarks

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, but NamedPipeServerStream.WaitForConnection will not return until erload:System.IO.Pipes.NamedPipeClientStream.Connect has returned. You set the timeout parameter to System.Threading.Timeout.Infinite to specify an infinite time-out value.

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.

Requirements

Namespace: System.IO.Pipes
Assembly: System.Core (in System.Core.dll)
Assembly Versions: 4.0.0.0