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

📄 sgippkg.h

📁 联通的短信网关平台。 sp 使用。 如果想自己用vc 开发短信业务
💻 H
字号:

/*
 *	SGIPPkg.h
 */
#ifndef __MOBILPACKAGE_H__
#define __MOBILPACKAGE_H__

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <time.h>
#include <errno.h>
#include <sys/wait.h>
#include <time.h>
#include <fcntl.h>
#include <unistd.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <pthread.h>

#include "sgip.h"

class CSGIPPkg
{
public:
	CSGIPPkg();
	~CSGIPPkg();

	int NewPackage(unsigned int nPkgType, char *pTotcp);

	int GetPackageType(const char *pBuf);
	int GetPackageLen(const char *pBuf);
	int GetPackageResult(const char *pBuf);
	int GetMessageLen(unsigned int nPkgType);

	//translate pBuf to sMsg:
	void ComposePackage
	(
		unsigned int nPkgType, 
		SGIP_MSG &stMsg, 
		const char *pBuf
	);
	//translate sMsg to pBuf:
	void CSGIPPkg::DeComposePackage
	(
		unsigned int nPkgType, 
		SGIP_MSG_BODY &stBody, 
		char *pBuf,
		int *pLen
	);

protected:

private:
	unsigned int GetSeqno();
	void GetTimeStamp(time_t iTime, char *pTimeStamp);
};

#endif


⌨️ 快捷键说明

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