Akonadi

bridgeserver.cpp
1 /***************************************************************************
2  * SPDX-FileCopyrightText: 2010 Volker Krause <[email protected]> *
3  * *
4  * SPDX-License-Identifier: LGPL-2.0-or-later *
5  ***************************************************************************/
6 
7 #include "bridgeserver.h"
8 
9 #include "exception.h"
10 
11 BridgeServerBase::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 }
void newConnection()
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Jul 2 2022 06:41:47 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.