AvogadroApp
Loading...
Searching...
No Matches
Public Member Functions | List of all members
LocalSocketConnectionListener Class Reference

#include <localsocketconnectionlistener.h>

Inheritance diagram for LocalSocketConnectionListener:
ConnectionListener

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
parentObjectparent
connectionStringThe address that the QLocalServer should listen on.

Member Function Documentation

◆ start()

void start ( )
overridevirtual

Start listening for incoming connections.

Implements ConnectionListener.

◆ stop() [1/2]

void stop ( bool  force)
overridevirtual

Stops the connection listener.

Parameters
forceIf true use QLocalServer::removeServer(...) to remove server.

Implements ConnectionListener.

◆ stop() [2/2]

void stop ( )
overridevirtual

Calls stop(false)

Implements ConnectionListener.

◆ connectionString()

QString connectionString ( ) const
overridevirtual
Returns
the address the QLocalServer is listening on.

Implements ConnectionListener.

◆ fullConnectionString()

QString fullConnectionString ( ) const
Returns
the full address the QLocalServer is listening on.