Begins an asynchronous operation to accept an incoming connection attempt.
| C# | Visual Basic |
public IAsyncResult BeginAcceptSocket( AsyncCallback callback, Object state )
Public Function BeginAcceptSocket ( _ callback As AsyncCallback, _ state As Object _ ) As IAsyncResult
- callback (AsyncCallback)
- An AsyncCallback delegate that references the method to invoke when the operation is complete.
- state (Object)
- A user-defined object containing information about the accept operation. This object is passed to the callback delegate when the operation is complete.
An IAsyncResult that references the asynchronous creation of the Socket.
| Exception | Condition |
|---|---|
| ObjectDisposedException | The Socket has been closed. |