winpty/TestNetServer/Session.h
Ryan Prichard c74f82abdb Pass an initial window size to the agent on startup.
* 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.
2011-11-24 03:03:25 -08:00

33 lines
480 B
C++

#ifndef SESSION_H
#define SESSION_H
#include <QObject>
class QTcpSocket;
class AgentClient;
class Session : public QObject
{
Q_OBJECT
public:
explicit Session(QTcpSocket *socket, QObject *parent = 0);
signals:
public slots:
private slots:
void onSocketReadyRead();
void onAgentReadyRead();
void cleanup();
private:
void initializeAgent(int cols, int rows);
private:
QTcpSocket *m_socket;
AgentClient *m_agentClient;
};
#endif // SESSION_H