NamedPipeServerStream::WaitForConnectionAsync Method (CancellationToken)
.NET Framework (current version)
Asynchronously waits for a client to connect to this NamedPipeServerStream object and monitors cancellation requests.
Assembly: System.Core (in System.Core.dll)
Parameters
- cancellationToken
-
Type:
System.Threading::CancellationToken
The token to monitor for cancellation requests.
Return Value
Type: System.Threading.Tasks::Task^A task that represents the asynchronous wait operation.
Because it is asynchronous, this method returns immediately, but the connection process is completed when the client calls Connect or ConnectAsync.
Cancellation requests using the cancellation token will only work if the NamedPipeServerStream object was created with a pipe option value of PipeOptions::Asynchronous or if the cancellation occurs before the WaitForConnectionAsync method is called.
.NET Framework
Available since 4.6
Available since 4.6
Show: