3#include <QLoggingCategory>
6#include "ChannelSSHTunnelForward.h"
7#include "SSHTunnelThread.h"
9static Q_LOGGING_CATEGORY(log,
"Channel.SSH.Tunnel.Thread")
14 m_Parameter(parameter)
16 qDebug(log) <<
"CSSHTunnelThread::CSSHTunnelThread";
18 check = connect(
this, SIGNAL(finished()),
19 this, SLOT(deleteLater()));
23CSSHTunnelThread::~CSSHTunnelThread()
25 qDebug(log) <<
"CSSHTunnelThread::~CSSHTunnelThread";
28void CSSHTunnelThread::Exit()
33void CSSHTunnelThread::run()
36 qDebug(log) <<
"CSSHTunnelThread run";
42 bool check = connect(p, SIGNAL(
sigServer(QString, quint16)),
43 this, SIGNAL(
sigServer(QString, quint16)));
45 check = connect(p, SIGNAL(
sigServer(QString)),
48 if(!p->
open(QIODevice::ReadWrite)) {
52 while (!m_bExit && nRet >= 0) {
55 qCritical(log) <<
"Process fail" << p->errorString();
64 emit sigError(nRet, p->errorString());
68 qDebug(log) <<
"CSSHTunnelThread end";
Includes SSH tunneling and a local socket service for forwarding data.
virtual bool open(OpenMode mode) override
Data is forwarded over a local socket and SSH tunnel.
void sigServer(QString szHost, quint16 nPort)
It is triggered when the socket service establishes a listener and is used to notify other local sock...