共用方式為


NamedPipeServerStream.BeginWaitForConnection(AsyncCallback, Object) 方法

定義

開始非同步操作,等候用戶端連接。

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

參數

callback
AsyncCallback

用戶端連接到 NamedPipeServerStream 物件時所呼叫的方法。

state
Object

使用者所提供的物件,可從其他要求中辨別這個特定的非同步要求。

傳回

參考非同步要求的物件。

屬性

例外狀況

管道不是非同步開啟。

-或-

管道連接已經建立。

-或-

尚未設定管道控制代碼。

管道連線已中斷。

管道已關閉。

備註

這是的 WaitForConnection異步對等專案。

EndWaitForConnection 每次呼叫 都必須只呼叫 BeginWaitForConnection一次。

適用於