Visual Basic (Declaration)
<HostProtectionAttribute(SecurityAction.LinkDemand, ExternalThreading := True)> _
Public Function BeginConnect ( _
addresses As IPAddress(), _
port As Integer, _
requestCallback As AsyncCallback, _
state As Object _
) As IAsyncResult
Dim instance As TcpClient
Dim addresses As IPAddress()
Dim port As Integer
Dim requestCallback As AsyncCallback
Dim state As Object
Dim returnValue As IAsyncResult
returnValue = instance.BeginConnect(addresses, _
port, requestCallback, state)
[HostProtectionAttribute(SecurityAction.LinkDemand, ExternalThreading = true)]
public IAsyncResult BeginConnect(
IPAddress[] addresses,
int port,
AsyncCallback requestCallback,
Object state
)
[HostProtectionAttribute(SecurityAction::LinkDemand, ExternalThreading = true)]
public:
IAsyncResult^ BeginConnect(
array<IPAddress^>^ addresses,
int port,
AsyncCallback^ requestCallback,
Object^ state
)
/** @attribute HostProtectionAttribute(SecurityAction.LinkDemand, ExternalThreading = true) */
public IAsyncResult BeginConnect(
IPAddress[] addresses,
int port,
AsyncCallback requestCallback,
Object state
)
public function BeginConnect(
addresses : IPAddress[],
port : int,
requestCallback : AsyncCallback,
state : Object
) : IAsyncResult
Parameters
- addresses
- Type: array<System.Net..::.IPAddress>[]()[]
At least one IPAddress that designates the remote hosts.
- port
- Type: System..::.Int32
The port number of the remote hosts.
- requestCallback
- Type: System..::.AsyncCallback
An AsyncCallback delegate that references the method to invoke when the operation is complete.
- state
- Type: System..::.Object
A user-defined object that contains information about the connect operation. This object is passed to the requestCallback delegate when the operation is complete.