Loading...
Searching...
No Matches
LocalSocketConnectionListener Class Reference

`#include <localsocketconnectionlistener.h>`

Inheritance diagram for LocalSocketConnectionListener:

## Public Member Functions

| LocalSocketConnectionListener (QObject *parentObject, const QString &connectionString)
void | start () override
void | stop (bool force) override
void | stop () override
QString | connectionString () const override
QString | fullConnectionString () const
Public Member Functions inherited from ConnectionListener
| ConnectionListener (QObject *parentObject=nullptr)

## Additional Inherited Members

Public Types inherited from ConnectionListener
enum | Error { AddressInUseError , UnknownError = -1 }
Signals inherited from ConnectionListener
void | newConnection (Avogadro::RPC::Connection *connection)
void | connectionError (Avogadro::RPC::ConnectionListener::Error errorCode, const QString &message)

## Detailed Description

Provides an implementation of ConnectionListener using QLocalServer. Each connection made is emitted as a LocalSocketConnection.

<avogadro/rpc/localsocketconnectionlistener.h>

## Constructor & Destructor Documentation

## LocalSocketConnectionListener()

LocalSocketConnectionListener | ( | QObject * | parentObject,
|  | const QString & | connectionString )

explicit

Constructor.

Parameters

  parentObject | parent
  connectionString | The address that the QLocalServer should listen on.

## Member Function Documentation

## start()

void start | ( |  | ) |

override virtual

Start listening for incoming connections.

Implements ConnectionListener.

## stop() [1/2]

void stop | ( | bool | force | ) |

override virtual

Stops the connection listener.

Parameters

  force | If true use QLocalServer::removeServer(...) to remove server.

Implements ConnectionListener.

## stop() [2/2]

void stop | ( |  | ) |

override virtual

Calls stop(false).

Implements ConnectionListener.

## connectionString()

QString connectionString | ( |  | ) | const

override virtual

Returns
  the address the QLocalServer is listening on.

Implements ConnectionListener.

## fullConnectionString()

QString fullConnectionString | ( |  | ) | const

Returns
  the full address the QLocalServer is listening on.