summaryrefslogtreecommitdiffstats
path: root/tests/manual/examples/quick/customdialogs/server.h
blob: 563465013f1f4efa12b5a430216349de0365f30a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

#ifndef SERVER_H
#define SERVER_H

#include <QObject>
#include <QTcpServer>

class Server : public QObject
{
    Q_OBJECT

public:
    explicit Server(QObject *parent = nullptr);

public slots:
    void run();

private slots:
    void handleNewConnection();
    void handleReadReady();

private:
    QTcpServer m_server;
    QByteArray m_data;
};

#endif // SERVER_H