📄 msn.h
字号:
/********************************************************************** * FileName: MSN.h * Author: Jay * Version: V01.00.00.00 * Date: 2004.05.28 * Description: * MSN监控类 * 关于MSN通讯协议,可参看以下网页: * http://www.kernelstudio.com/getitem.asp?id=42 * http://www.hypothetic.org/docs/msn/ * **********************************************************************/#ifndef __MSN__H__#define __MSN__H__#include "BaseConst.h"#include "IPPacket.h"#include "TCPPacket.h"//## Documentation//## 监控MSN类class CMSN{ public: CMSN () {;}; ~CMSN() {;}; //##Documentation //## 增加一条聊天记录 //## @return //## 0: success //## -1: fail int addChatRecord(); //##Documentation //## 增加一个新session //## @return //## 0: success //## -1: fail int newSession(); //## Documentation //## 初始化 //## @param //## _ip 一个IP包指针,以IP包传入一条聊天的信息 //## @return //## 0: success //## -1: fail int init(const IP_PACKET *_ip); //## Documentation //## 判断是否新的session //## @param //## @return //## true: //## false: bool isNewSession(); //## Documentation //## 判断是否聊天包 //## @param //## @return //## true: //## false: bool isMsgPacket(); private: //##Documentation //## 获取一个聊天包的下一行(每行以\x0D\x0A结束,最后一行没有结束符) //## @param //## 无 //## @return //## 成功: 下一行的首指针 //## 失败或者已经是最后一行: NULL const char* getNextLine(); private: int m_TcpContentLen; const char* m_line; const char* m_lastline; const char* m_lineHead; const TCP_PACKET * m_ptcp; char m_scontent[2000]; char m_usr[255]; char m_nickname[512]; unsigned long m_src_ip; unsigned long m_dst_ip; unsigned short m_src_port; unsigned short m_dst_port;};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -