Begins an asynchronous request for a connection to a network device.
Namespace: Jscape.Util.ProxyAssembly: Jscape.Ssh (in Jscape.Ssh.dll) Version: 2.7.2.0
Syntax
C# |
---|
public IAsyncResult BeginConnect(
string host,
int port,
AsyncCallback callback,
Object state
) |
Visual Basic |
---|
Public Function BeginConnect ( _
host As String, _
port As Integer, _
callback As AsyncCallback, _
state As Object _
) As IAsyncResult |
Visual C++ |
---|
public:
IAsyncResult^ BeginConnect(
String^ host,
int port,
AsyncCallback^ callback,
Object^ state
) |
Parameters
- host
- Type: System..::..String
The host to connect to.
- port
- Type: System..::..Int32
The port on the remote host to connect to.
- callback
- Type: System..::..AsyncCallback
The AsyncCallback delegate.
- state
- Type: System..::..Object
An object that contains state information for this request.
Return Value
An IAsyncResult that references the asynchronous connection.
Exceptions
Exception | 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