System.Tether.Manager.TTetheringManager.AutoConnect

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

procedure AutoConnect(Timeout: Cardinal; const Target: string = ''); overload;
procedure AutoConnect(const Target: string = ''); overload;

C++

void __fastcall AutoConnect(unsigned Timeout, const System::UnicodeString Target = System::UnicodeString())/* overload */;
void __fastcall AutoConnect(const System::UnicodeString Target = System::UnicodeString())/* overload */;

Properties

Type Visibility Source Unit Parent
procedure
function
public
System.Tether.Manager.pas
System.Tether.Manager.hpp
System.Tether.Manager TTetheringManager

Description

Starts the automatic connection to remote managers on each registered adapter.

There are two overloaded StartManagersAutoConnect methods, with their parameters described below.

Call the first overloaded StartManagersAutoConnect method with a custom discovery <Timeout> and a <Target>.

Parameter Meaning

<Timeout>

Time the discovery should last before each adapter registers in this manager any discovered remote manager.

<Target>

Optional parameter. You can specify a target for the automatic discovery, such as an IP address or subnet, or a list of Bluetooth devices (Bluetooth address or Bluetooth device name).

Call the second overloaded StartManagersAutoConnect method with a custom <Target>. The automatic timeout of the adapter is used for auto discovery remote managers.

Parameter Meaning

<Target>

Optional parameter. You can specify a target for an automatic discovery, such as an IP address or subnet, or a Bluetooth device.

For Network Adapters

By default, your manager performs the discovery on the subnet of the local area network (LAN) where the device running your application is. You can also specify an IP address or subnet:

  • To specify an IP address to search for remote managers, specify that IP address as the <Target>.
  • To specify a subnet of IP addresses, specify an IP address with a 0 as its fourth number. For example, if you specify "192.168.4.0" as the <Target>, your manager searches the 192.168.4.x subnet for remote managers.
    Note: You can not specify wider subnets. For example, "192.168.0.0" is not supported.

For Bluetooth Adapters

We recommend you to use a custom <TimeOut> value not exceeding the maximum automatic timeout (this value depends on the number of Bluetooth devices paired to the manager).

The list of Bluetooth devices that can be passed as a <Target> includes:

Note: The Bluetooth devices correspond to the paired devices to the manager.

See Also