c74f82abdb
* The TestNet protocol starts with a terminal resize escape sequence, so the server discards all input until it sees the sequence, and it delays starting the agent. Eventually, the goal is to implement an SSH server, and the SSH message that creates a PTY also provides the terminal size.
33 lines
633 B
C++
33 lines
633 B
C++
#ifndef AGENTCLIENT_H
|
|
#define AGENTCLIENT_H
|
|
|
|
#include <QObject>
|
|
|
|
class QLocalServer;
|
|
class QLocalSocket;
|
|
class AgentMsg;
|
|
typedef struct _PROCESS_INFORMATION PROCESS_INFORMATION;
|
|
typedef struct _INPUT_RECORD INPUT_RECORD;
|
|
|
|
class AgentClient : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit AgentClient(int initialCols, int initialRows, QObject *parent = 0);
|
|
int agentPid();
|
|
void writeMsg(const AgentMsg &msg);
|
|
void startShell();
|
|
QLocalSocket *getSocket();
|
|
|
|
signals:
|
|
|
|
public slots:
|
|
|
|
private:
|
|
QLocalSocket *m_socket;
|
|
PROCESS_INFORMATION *m_agentProcess;
|
|
static int m_counter;
|
|
};
|
|
|
|
#endif // AGENTCLIENT_H
|