ProxySocket.BeginConnect Method (String, Int32, AsyncCallback, Object)

Mentalis.org ProxySocket

Mentalis.org ProxySocket Documentation

ProxySocket.BeginConnect Method (String, Int32, AsyncCallback, Object)

Begins an asynchronous request for a connection to a network device.

[Visual Basic]Overloads Public Function BeginConnect( _
   ByVal host As String, _
   ByVal port As Integer, _
   ByVal callback As System.AsyncCallback, _
   ByVal state As Object _
) As System.IAsyncResult
[C#]
public IAsyncResult BeginConnect(
   string host,
   int port,
   AsyncCallback callback,
   object state
);

Parameters

host
The host to connect to.
port
The port on the remote host to connect to.
callback
The AsyncCallback delegate.
state
An object that contains state information for this request.

Return Value

An IAsyncResult that references the asynchronous connection.

Exceptions

Exception Type Condition
System.ArgumentNullException The host parameter is a null reference (Nothing in Visual Basic).
System.ArgumentException The port parameter is invalid.
System.Net.Sockets.SocketException An operating system error occurs while creating the Socket.
System.ObjectDisposedException The Socket has been closed.

See Also

ProxySocket Class | ProxySocket Members | Org.Mentalis.Network.ProxySocket Namespace | ProxySocket.BeginConnect Overload List