From d3624454f67e3afc026d7e16546f5549e67f6102 Mon Sep 17 00:00:00 2001 From: daniel-Jones Date: Thu, 6 Jul 2017 19:04:48 +0930 Subject: Added console based server that allows clients to connect and send commands to the microcontroller, does not require X to use, includes the IRC bot. Also included my beginning works on a c ncurses based client. --- qt/consoleserver/server.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 qt/consoleserver/server.h (limited to 'qt/consoleserver/server.h') diff --git a/qt/consoleserver/server.h b/qt/consoleserver/server.h new file mode 100644 index 0000000..9fd84dc --- /dev/null +++ b/qt/consoleserver/server.h @@ -0,0 +1,26 @@ +#ifndef SERVER_H +#define SERVER_H + +#include +#include + +class server : public QObject +{ + Q_OBJECT + public: + explicit server(QObject *parent = 0); + bool server_start(); + bool server_stop(); + private: + QTcpServer *srv; + void handle(QString msg); + private slots: + void new_connection(); +signals: + void sendcmd(QString); + + + public slots: +}; + +#endif // SERVER_H -- cgit v1.2.3