NamedPipeClientStream::ConnectAsync Method (Int32, CancellationToken)

.NET Framework (current version)
 

Asynchronously connects to a waiting server within the specified timeout period and monitors cancellation requests.

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

public:
Task^ ConnectAsync(
	int timeout,
	CancellationToken cancellationToken
)

Parameters

timeout
Type: System::Int32

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

cancellationToken
Type: System.Threading::CancellationToken

The token to monitor for cancellation requests. The default value is None.

Return Value

Type: System.Threading.Tasks::Task^

A task that represents the asynchronous connect operation.

.NET Framework
Available since 4.6
Return to top
Show: