提交 e0774521 编写于 作者: 丁劲犇's avatar 丁劲犇 😸

Split SSL and plain connecting messages

上级 50e2d6ce
......@@ -8,6 +8,9 @@ namespace ZP_Cluster{
m_pClusterNet = new ZPNetwork::zp_net_ThreadPool(8192,this);
connect(m_pClusterNet,&ZPNetwork::zp_net_ThreadPool::evt_Message, this,&zp_ClusterTerm::evt_Message);
connect(m_pClusterNet,&ZPNetwork::zp_net_ThreadPool::evt_SocketError, this,&zp_ClusterTerm::evt_SocketError);
m_nPortPublish = 0;
}
......@@ -24,4 +27,33 @@ namespace ZP_Cluster{
{
return m_pClusterEng->canClose() && m_pClusterNet->CanExit();
}
//this event indicates new client connected.
void zp_ClusterTerm::on_evt_NewClientConnected(QObject * /*clientHandle*/)
{
}
//this event indicates new client encrypted.
void zp_ClusterTerm::on_evt_ClientEncrypted(QObject * /*clientHandle*/)
{
}
//this event indicates a client disconnected.
void zp_ClusterTerm::on_evt_ClientDisconnected(QObject * /*clientHandle*/)
{
}
//some data arrival
void zp_ClusterTerm::on_evt_Data_recieved(QObject * /*clientHandle*/,const QByteArray & /*datablock*/ )
{
}
//a block of data has been successfuly sent
void zp_ClusterTerm::on_evt_Data_transferred(QObject * /*clientHandle*/,qint64 /*bytes sent*/)
{
}
}
......@@ -38,6 +38,18 @@ namespace ZP_Cluster{
void evt_Message(const QString &);
//The socket error message
void evt_SocketError(QObject * senderSock ,QAbstractSocket::SocketError socketError);
protected slots:
//this event indicates new client connected.
void on_evt_NewClientConnected(QObject * /*clientHandle*/);
//this event indicates new client encrypted.
void on_evt_ClientEncrypted(QObject * /*clientHandle*/);
//this event indicates a client disconnected.
void on_evt_ClientDisconnected(QObject * /*clientHandle*/);
//some data arrival
void on_evt_Data_recieved(QObject * /*clientHandle*/,const QByteArray & /*datablock*/ );
//a block of data has been successfuly sent
void on_evt_Data_transferred(QObject * /*clientHandle*/,qint64 /*bytes sent*/);
public slots:
//!Start listen, this term can be connected by newly joined terms in future.
void StartListen(const QHostAddress &addr, int nPort);
......
......@@ -15,6 +15,7 @@ namespace SmartLink{
{
m_nHeartBeatingDeadThrd = 180;
connect (m_pThreadPool,&ZPNetwork::zp_net_ThreadPool::evt_NewClientConnected,this,&st_client_table::on_evt_NewClientConnected,Qt::QueuedConnection);
connect (m_pThreadPool,&ZPNetwork::zp_net_ThreadPool::evt_ClientEncrypted,this,&st_client_table::on_evt_ClientEncrypted,Qt::QueuedConnection);
connect (m_pThreadPool,&ZPNetwork::zp_net_ThreadPool::evt_ClientDisconnected,this,&st_client_table::on_evt_ClientDisconnected,Qt::QueuedConnection);
connect (m_pThreadPool,&ZPNetwork::zp_net_ThreadPool::evt_Data_recieved,this,&st_client_table::on_evt_Data_recieved,Qt::QueuedConnection);
connect (m_pThreadPool,&ZPNetwork::zp_net_ThreadPool::evt_Data_transferred,this,&st_client_table::on_evt_Data_transferred,Qt::QueuedConnection);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册