st_cross_svr_node.h 1.0 KB
Newer Older
1 2 3
#ifndef ST_CROSS_SVR_NODE_H
#define ST_CROSS_SVR_NODE_H
#include "../cluster/zp_clusternode.h"
4
#include "st_cross_svr_msg.h"
5
namespace SmartLink{
丁劲犇's avatar
丁劲犇 已提交
6
	class st_client_table;
7 8 9 10 11
	class st_cross_svr_node : public ZP_Cluster::zp_ClusterNode
	{
		Q_OBJECT
	public:
		st_cross_svr_node(ZP_Cluster::zp_ClusterTerm * pTerm, QObject * psock,QObject *parent);
丁劲犇's avatar
丁劲犇 已提交
12
		void setClientTable(st_client_table * table);
13 14 15
	protected:
		//!virtual functions, dealing with the user-defined operations.
		virtual bool deal_user_data(const QByteArray &);
16 17
		bool deal_msg();
		int st_bytesLeft();
丁劲犇's avatar
丁劲犇 已提交
18 19
	protected:
		st_client_table * m_pClientTable;
20
		//Current Message Offset, according to m_currentHeader
21
		quint32 m_currStMegSize;
22 23 24 25 26 27
		//Current un-procssed message block.for large blocks,
		//this array will be re-setted as soon as some part of data has been
		//dealed, eg, send a 200MB block, the 200MB data will be splitted into pieces
		QByteArray m_currStBlock;
		//current Header
		STCROSSSVR_MSG::tag_msgHearder m_st_Header;
28 29 30
	};
}
#endif // ST_CROSS_SVR_NODE_H