httpserver.h 770 B

1234567891011121314151617181920212223242526
  1. /*
  2. * Copyright (C) by Daniel Molkentin <danimo@owncloud.com>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; version 2 of the License.
  7. *
  8. * This program is distributed in the hope that it will be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  10. * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  11. * for more details.
  12. */
  13. #include <QTcpServer>
  14. class HttpServer : public QTcpServer
  15. {
  16. Q_OBJECT
  17. public:
  18. HttpServer(qint16 port, QObject* parent = 0);
  19. void incomingConnection(int socket);
  20. private slots:
  21. void readClient();
  22. void discardClient();
  23. };