Class CClient#

Inheritance Relationships#

Base Types#

Class Documentation#

class CClient : public sdv::CSdvObject, public sdv::com::IClientConnect#

Client object.

Public Functions

virtual bool OnInitialize() override#

Initialization event, called after object configuration was loaded. Overload of sdv::CSdvObject::OnInitialize.

Returns:

Returns ‘true’ when the initialization was successful, ‘false’ when not.

virtual void OnShutdown() override#

Shutdown the object. Overload of sdv::CSdvObject::OnShutdown.

virtual sdv::IInterfaceAccess *Connect(const sdv::u8string &ssConnectString) override#

Connect to a remote system using the connection string to contact the system. Overload of sdv::com::IClientConnect::Connect.

Remark

After a successful connection, the ConnectClient utility is not needed any more.

Parameters:

ssConnectString[in] Optional connection string to use for connection. If not provided, the connection will automatically get the connection ID from the app-control service (default). The connection string for a local connection can be of the form:

[Client]
Type = "Local"
Instance = 1234  # Optional: only use when connecting to a system with a different instance ID.
And the following can be used for a remote connection:
[Client]
Type = "Remote"
Interface = "127.0.0.1"
Port = 2000

Returns:

Returns an interface to the repository of the remote system or a NULL pointer if not found.

void Disconnect(sdv::com::TConnectionID tConnectionID)#

Disconnect and remove the remote repository object.

Parameters:

tConnectionID[in] The ID of the connection.