winpty/TestNetClient/UnixClient.h

44 lines
871 B
C
Raw Normal View History

#ifndef UNIXCLIENT_H
#define UNIXCLIENT_H
2011-11-11 10:20:32 +00:00
#include <QObject>
#include <QByteArray>
#include <termios.h>
class QSocketNotifier;
class QTcpSocket;
class UnixClient : public QObject
{
Q_OBJECT
public:
explicit UnixClient(QTcpSocket *socket, QObject *parent = 0);
virtual ~UnixClient();
private:
static termios setRawTerminalMode();
static void restoreTerminalMode(termios original);
signals:
private slots:
void terminalResized();
void socketDisconnected();
2011-11-11 10:20:32 +00:00
void terminalReadActivated();
void socketBytesWritten();
void socketReadyRead();
void terminalWriteActivated();
void doServerToClient();
public slots:
private:
termios savedTermios;
QSocketNotifier *terminalReadNotifier;
QSocketNotifier *terminalWriteNotifier;
QTcpSocket *socket;
QByteArray terminalWriteBuffer;
};
#endif // UNIXCLIENT_H