smppconnection.cpp

来自「一个短信smpp协议开发包源码」· C++ 代码 · 共 59 行

CPP
59
字号
// SmppConnection.cpp: implementation of the CSmppConnection class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
//#include "SMPPAPI.h"
#include "SmppConnection.h"
#include "smpppacket.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CSmppConnection::CSmppConnection()
{
	m_system_id = "";
	m_password = "";
	m_system_type = "";
}

CSmppConnection::~CSmppConnection()
{

}

int CSmppConnection::bind(CString sysid, CString passwd, CString systype, CString addrrange)
{
	CSmppAddress adrrng;

	adrrng.setAddrTon(0);
	adrrng.setAddrNpi(0);
	adrrng.setAddr(addrrange);

	return bind(sysid, passwd, systype, adrrng);
}

int CSmppConnection::unbind()
{
	CUnbind pak;

	sendPacket(pak);

	return 0;
}

int CSmppConnection::enquireLink()
{
	CEnquireLink pak;

	sendPacket(pak);

	return 0;
}

⌨️ 快捷键说明

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