System::Net::Sockets::TcpClient::BeginConnect method

TcpClient::BeginConnect(String, int32_t, AsyncCallback, System::SharedPtr<Object>) method

Initiates an asynchronous connect operation.

System::SharedPtr<IAsyncResult> System::Net::Sockets::TcpClient::BeginConnect(String host, int32_t port, AsyncCallback requestCallback, System::SharedPtr<Object> state)
ParameterTypeDescription
hostStringA remote host name.
portint32_tA port of the remote host.
requestCallbackAsyncCallbackA callback that will be called when the operation completes.
stateSystem::SharedPtr<Object>User-provided data used to uniquely identify each asynchronous connect operation.

ReturnValue

An IAsyncResult object representing the initiated asynchronous connect operation.

See Also

TcpClient::BeginConnect(System::ArrayPtr<System::SharedPtr<IPAddress>>, int32_t, AsyncCallback, System::SharedPtr<Object>) method

Initiates an asynchronous connect operation.

System::SharedPtr<IAsyncResult> System::Net::Sockets::TcpClient::BeginConnect(System::ArrayPtr<System::SharedPtr<IPAddress>> addresses, int32_t port, AsyncCallback requestCallback, System::SharedPtr<Object> state)
ParameterTypeDescription
addressesSystem::ArrayPtr<System::SharedPtr<IPAddress>>The IP addresses of a remote host.
portint32_tA port of the remote host.
requestCallbackAsyncCallbackA callback that will be called when the operation completes.
stateSystem::SharedPtr<Object>User-provided data used to uniquely identify each asynchronous connect operation.

ReturnValue

An IAsyncResult object representing the initiated asynchronous connect operation.

See Also

TcpClient::BeginConnect(System::SharedPtr<IPAddress>, int32_t, AsyncCallback, System::SharedPtr<Object>) method

Initiates an asynchronous connect operation.

System::SharedPtr<IAsyncResult> System::Net::Sockets::TcpClient::BeginConnect(System::SharedPtr<IPAddress> address, int32_t port, AsyncCallback requestCallback, System::SharedPtr<Object> state)
ParameterTypeDescription
addressSystem::SharedPtr<IPAddress>The IP address of a remote host.
portint32_tA port of the remote host.
requestCallbackAsyncCallbackA callback that will be called when the operation completes.
stateSystem::SharedPtr<Object>User-provided data used to uniquely identify each asynchronous connect operation.

ReturnValue

An IAsyncResult object representing the initiated asynchronous connect operation.

See Also