DotMSN |

# ProxySocket.EndConnect Method

Ends a pending asynchronous connection request.

[Visual Basic]
Public Sub EndConnect( _
ByVal asyncResult As IAsyncResult _
)
[C#]
new public void EndConnect(
IAsyncResult asyncResult
);

#### Parameters

asyncResult
  Stores state information for this asynchronous operation as well as any user-defined data.

#### Exceptions

Exception Type | Condition
--- | ---
ArgumentNullException | The asyncResult parameter is a null reference (Nothing in Visual Basic).
ArgumentException | The asyncResult parameter was not returned by a call to the BeginConnect method.
SocketException | An operating system error occurs while accessing the Socket.
ObjectDisposedException | The Socket has been closed.
InvalidOperationException | EndConnect was previously called for the asynchronous connection.
ProxyException | The proxy server refused the connection.

#### See Also

ProxySocket Class | Org.Mentalis.Network.ProxySocket Namespace