9#include "connectionserver.h"
10#include "connection_p.h"
11#include "connectionbackend_p.h"
12#include "kiocoredebug.h"
16ConnectionServer::ConnectionServer(
QObject *parent)
21ConnectionServer::~ConnectionServer() =
default;
23void ConnectionServer::listenForRemote()
25 backend =
new ConnectionBackend(
this);
26 if (
auto result = backend->listenForRemote(); !result.success) {
27 qCWarning(KIO_CORE) <<
"ConnectionServer::listenForRemote failed:" << result.error;
33 connect(backend, &ConnectionBackend::newConnection,
this, &ConnectionServer::newConnection);
37QUrl ConnectionServer::address()
const
40 return backend->address;
45bool ConnectionServer::isListening()
const
47 return backend && backend->state == ConnectionBackend::Listening;
50void ConnectionServer::setNextPendingConnection(Connection *conn)
52 ConnectionBackend *newBackend = backend->nextPendingConnection();
55 conn->d->setBackend(newBackend);
56 newBackend->setParent(conn);
61#include "moc_connectionserver.cpp"
A namespace for KIO globals.
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:27 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.