NamedPipeServerStream.BeginWaitForConnection(AsyncCallback, Object) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
開始非同步操作,等候用戶端連接。
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一次。