⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 socket_control_protocol_handler.h

📁 程序实现了在ip协议之上加一层RUDP协议
💻 H
字号:
// SOCKET_Control_Protocol_Handler.h: interface for the SOCKET_Control_Protocol_Handler class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_SOCKET_CONTROL_PROTOCOL_HANDLER_H__1F8402CE_5277_4E41_B31C_2B7231B5ECF4__INCLUDED_)
#define AFX_SOCKET_CONTROL_PROTOCOL_HANDLER_H__1F8402CE_5277_4E41_B31C_2B7231B5ECF4__INCLUDED_

#include"socket_data_struct.h"
#include"socket_message_type.h"
#include "SOCKET_ReTransmit_Timing2_Protocol_Handler.h"
#include "Socket_Create_Message_Protocol_Handler.h"
#include "RUDP_EnUnPacket_Handler.h"
#include "SOCKET_ACTIVITY_LIST_Handler.h"
#include "Socket_SR.h"
#include "SOCKET_Sequence_Manager.h"
#include "SOCKET_Receive_Data_Buff.h"

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class SOCKET_Control_Protocol_Handler  
{
public:
	SOCKET_Control_Protocol_Handler();
	virtual ~SOCKET_Control_Protocol_Handler();

	static SOCKET_Control_Protocol_Handler* get_instance();
	bool  f_SOCKET_Control_Message_Analyse_Handler(Message  *msg);
	bool  f_SOCKET_Control_RUDP_Analyse_Handler(Data_Queue_STR* data_queue_str);
	bool  f_SOCKET_ACK_Handler(unsigned int deviceID, unsigned int seq, unsigned int rudp_tag);
	void  f_SOCKET_NACK_Handler(int  deviceID , int  packet_seq);
	bool  f_SOCKET_ACK_Send(unsigned int s_deviceID, unsigned int d_deviceID, unsigned int packet_seq);
	void  f_SOCKET_NACK_Send(int  deviceID , int  packet_seq);
	void  f_SOCKET_Send_Success_Message(int  seq);
	void  f_SOCKET_delete_data_buff_Packet(unsigned int rudp_tag);
	void  f_SOCKET_Connected_Notify_Message(int  deviceID);
	
	bool  f_SOCKET_User_Login(unsigned int s_deviceID, unsigned int d_deviceID, char* password, unsigned int pass_length);
	bool  f_SOCKET_Check_User(unsigned int s_deviceID,unsigned int d_deviceID,char* password);
	bool  f_SOCKET_User_Login_Response(unsigned int s_deviceID, unsigned int d_deviceID,char login_result);
	bool  f_SOCKET_User_Login_Notify(unsigned int d_deviceID, char login_result);
//	bool  f_SOCKET_App_Receive_Success_Handler(Message* msg);
	
private:
	static SOCKET_Control_Protocol_Handler* pinstance;
	SOCKET_ReTransmit_Timing2_Protocol_Handler* retransmit_timing2_ptr;	
	Socket_Create_Message_Protocol_Handler* create_message_protocol_handler_ptr;
	RUDP_EnUnPacket_Handler* rudp_enunpacket_manager_ptr;
	SOCKET_ACTIVITY_LIST_Handler* activity_list_manager_ptr;
	Socket_SR* socket_sr_ptr;
	SOCKET_Sequence_Manager* sequence_manager_ptr;
	SOCKET_Receive_Data_Buff* receive_data_buff_ptr;
};

#endif // !defined(AFX_SOCKET_CONTROL_PROTOCOL_HANDLER_H__1F8402CE_5277_4E41_B31C_2B7231B5ECF4__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -