# class LocalSocketClient

###

Module | soprano
Namespace | Soprano::Client
Class | LocalSocketClient
Inherits | QObject,Soprano::Error::ErrorCache

\class LocalSocketClient localsocketclient.h Soprano/Client/LocalSocketClient

Creates a connection to the %Soprano server through a local socket interface.

The %Soprano server supports more than one way of communication. Beside D-Bus (see DBusClient) it can be contacted via a local socket.

The LocalSocketClient does not support signals. Thus, the models created by it will not emit signals such as Model.statementAdded.

Author Sebastian Trueg <trueg@kde.org>

\since 2.1

### methods

- LocalSocketClient (parent)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  parent | QObject | 0

  Create a new Client instance.

- connect (name)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  name | QString | QString()

  Tries to connect to the %Soprano server.

  Returns true on success, false if an error occured. Check lastError() for details.

- createModel (name, settings)

  returns Soprano.Model

  Argument | Type | Default
  --- | --- | ---
  name | QString |
  settings | QList<Soprano::BackendSetting> | QList<Soprano.BackendSetting>()

  Creates a new Model instance that wraps a server model. %Client models are very light wrappers and creating them is very fast.

  name - The name of the model to access.

  settings - The settings to send to the server for creating a new model. These settings may be ignored by the server if a model with that name has already been created.

  Returns A new Model instance wrapping the requested server model or 0 on error (check lastError() for details.)

- disconnect ( )

  returns Nothing

  Disconnect from the server. The created model instances are not deleted but remain useless; open iterators are closed.

- isConnected ( )

  returns bool

  Check if the client is connected to a server.

  Returns true if this client is connected to a server, false otherwise.

- removeModel (name)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  name | QString |

  Deletes a model including all its data.

  name - The name of the model to remove.

  Calling this method will remove all data physically. It can not be reverted. Use with care.