Akonadi

bridgeserver.cpp
1/***************************************************************************
2 * SPDX-FileCopyrightText: 2010 Volker Krause <vkrause@kde.org> *
3 * *
4 * SPDX-License-Identifier: LGPL-2.0-or-later *
5 ***************************************************************************/
6
7#include "bridgeserver.h"
8
9#include "exception.h"
10
11BridgeServerBase::BridgeServerBase(quint16 port, QObject *parent)
12 : QObject(parent)
13 , m_server(new QTcpServer(this))
14{
15 connect(m_server, &QTcpServer::newConnection, this, &BridgeServerBase::slotNewConnection);
16 if (!m_server->listen(QHostAddress::Any, port)) {
17 throw Exception<std::runtime_error>(QStringLiteral("Can't listen to port %1: %2").arg(port).arg(m_server->errorString()));
18 }
19}
20
21#include "moc_bridgeserver.cpp"
void newConnection()
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:31:58 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.