A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.microsoft.com/en-us/dotnet/api/system.io.pipes.namedpipeclientstream.connectasync below:

NamedPipeClientStream.ConnectAsync Method (System.IO.Pipes) | Microsoft Learn

NamedPipeClientStream.ConnectAsync Method Definition

A task that represents the asynchronous connect operation.

Overloads ConnectAsync()
Source:
NamedPipeClientStream.cs
Source:
NamedPipeClientStream.cs
Source:
NamedPipeClientStream.cs
Source:
NamedPipeClientStream.cs

Asynchronously connects to a waiting server with an infinite timeout period.

public:
 System::Threading::Tasks::Task ^ ConnectAsync();
public System.Threading.Tasks.Task ConnectAsync();
member this.ConnectAsync : unit -> System.Threading.Tasks.Task
Public Function ConnectAsync () As Task
Returns

A task that represents the asynchronous connect operation.

Remarks

This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as ArgumentException, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by Connect().

ConnectAsync(Int32)
Source:
NamedPipeClientStream.cs
Source:
NamedPipeClientStream.cs
Source:
NamedPipeClientStream.cs
Source:
NamedPipeClientStream.cs

Asynchronously connects to a waiting server within the specified timeout period.

public:
 System::Threading::Tasks::Task ^ ConnectAsync(int timeout);
public System.Threading.Tasks.Task ConnectAsync(int timeout);
member this.ConnectAsync : int -> System.Threading.Tasks.Task
Public Function ConnectAsync (timeout As Integer) As Task
Parameters
timeout
Int32

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

Returns

A task that represents the asynchronous connect operation.

Remarks

This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as ArgumentException, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by Connect(Int32).

ConnectAsync(CancellationToken)
Source:
NamedPipeClientStream.cs
Source:
NamedPipeClientStream.cs
Source:
NamedPipeClientStream.cs
Source:
NamedPipeClientStream.cs

Asynchronously connects to a waiting server and monitors cancellation requests.

public:
 System::Threading::Tasks::Task ^ ConnectAsync(System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task ConnectAsync(System.Threading.CancellationToken cancellationToken);
member this.ConnectAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function ConnectAsync (cancellationToken As CancellationToken) As Task
Parameters
cancellationToken
CancellationToken

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

Returns

A task that represents the asynchronous connect operation.

Exceptions

The cancellation token was canceled. This exception is stored into the returned task.

Remarks

This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as ArgumentException, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by Connect().

ConnectAsync(Int32, CancellationToken)
Source:
NamedPipeClientStream.cs
Source:
NamedPipeClientStream.cs
Source:
NamedPipeClientStream.cs
Source:
NamedPipeClientStream.cs

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

public:
 System::Threading::Tasks::Task ^ ConnectAsync(int timeout, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task ConnectAsync(int timeout, System.Threading.CancellationToken cancellationToken);
member this.ConnectAsync : int * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function ConnectAsync (timeout As Integer, cancellationToken As CancellationToken) As Task
Parameters
timeout
Int32

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

cancellationToken
CancellationToken

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

Returns

A task that represents the asynchronous connect operation.

Exceptions

The cancellation token was canceled. This exception is stored into the returned task.

Remarks

This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as ArgumentException, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by Connect(Int32).

ConnectAsync(TimeSpan, CancellationToken)
Source:
NamedPipeClientStream.cs
Source:
NamedPipeClientStream.cs
Source:
NamedPipeClientStream.cs
Source:
NamedPipeClientStream.cs

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

public:
 System::Threading::Tasks::Task ^ ConnectAsync(TimeSpan timeout, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task ConnectAsync(TimeSpan timeout, System.Threading.CancellationToken cancellationToken);
member this.ConnectAsync : TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function ConnectAsync (timeout As TimeSpan, cancellationToken As CancellationToken) As Task
Parameters
timeout
TimeSpan

The amount of time to wait for the server to respond before the connection times out.

cancellationToken
CancellationToken

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

Returns

A task that represents the asynchronous connect operation.

Exceptions

The cancellation token was canceled. This exception is stored into the returned task.

Remarks

This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as ArgumentException, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by Connect(TimeSpan).

Collaborate with us on GitHub

The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. In this article

Was this page helpful?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4