RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TSocketConnection.DoConnect Method

Connects to a remote application server.

Pascal
procedure DoConnect; override;
C++
virtual __fastcall DoConnect();

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.
 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!