แก้ไข

แชร์ผ่าน


NamedPipeServerStream.BeginWaitForConnection(AsyncCallback, Object) Method

Definition

Begins an asynchronous operation to wait for a client to connect.

public:
 IAsyncResult ^ BeginWaitForConnection(AsyncCallback ^ callback, System::Object ^ state);
public IAsyncResult BeginWaitForConnection (AsyncCallback? callback, object? state);
public IAsyncResult BeginWaitForConnection (AsyncCallback callback, object state);
[System.Security.SecurityCritical]
public IAsyncResult BeginWaitForConnection (AsyncCallback callback, object state);
member this.BeginWaitForConnection : AsyncCallback * obj -> IAsyncResult
[<System.Security.SecurityCritical>]
member this.BeginWaitForConnection : AsyncCallback * obj -> IAsyncResult
Public Function BeginWaitForConnection (callback As AsyncCallback, state As Object) As IAsyncResult

Parameters

callback
AsyncCallback

The method to call when a client connects to the NamedPipeServerStream object.

state
Object

A user-provided object that distinguishes this particular asynchronous request from other requests.

Returns

An object that references the asynchronous request.

Attributes

Exceptions

The pipe was not opened asynchronously.

-or-

A pipe connection has already been established.

-or-

The pipe handle has not been set.

The pipe connection has been broken.

The pipe is closed.

Remarks

This is the asynchronous equivalent of WaitForConnection.

EndWaitForConnection must be called exactly once for every call to BeginWaitForConnection.

Applies to