Datasnap.Win.SConnect.TSocketConnection.DoConnect

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure DoConnect; override;

C++

virtual void __fastcall DoConnect();

Properties

Type Visibility Source Unit Parent
procedure
function
protected
Datasnap.Win.SConnect.pas
Datasnap.Win.SConnect.hpp
Datasnap.Win.SConnect TSocketConnection

Description

Connects to a remote application server.

DoConnect is used internally to connect to the application server when the Connected property is set to true. If the Host or Address and Port properties are set, DoConnect uses these to locate the socket on the server machine. Otherwise, if the ObjectBroker property is set, it obtains these values from the object broker.

Once the server machine is located, DoConnect opens a connection.

Note: When ObjectBroker is nil (Delphi) or NULL (C++), the values of Host, Address, and Port are saved with the socket connection component. If ObjectBroker is not nil (Delphi) or NULL (C++), these values are not saved from design time. However, once these values are set (either by values obtained from the Object Broker or by values specified in code at runtime), they are used every time a connection must be re-established. If these values subsequently fail, the socket connection component fetches new values from the Object Broker.

See Also