近期在做电信3.1协议,从网上下载一个测试版代码SMGPGateway C#版本的,我给改成3.1了,发送短信,接收短信都正常,就是代码在SMGPBody_Deliver_Resp.cs中回复网关告诉网关已经收到上行的短信的时候,网关会连续发3次给我,由于3。1协议里面说,下发短信给SP为60秒一次,如果状态state=0就下发一次,但是不知道什么原因,下发3次,郁闷,期待高手解决问题?
代码using System;
using System.Collections.Generic;
using System.Text;namespace SMGP3_0
{
public class SMGPBody_Deliver_Resp : SMGPBody
{
public override UInt32 PackID
{
get { return 0x80000003; }
} public SMGPBody_Deliver_Resp()
{
Add(new SMPP.Variable.Binary(10));
Add(new SMPP.Variable.Integer32());
} /// <summary>
/// 客户端认证码
/// </summary>
public byte[] MsgID
{
get
{
return (this[0] as SMPP.Variable.Binary).Value;
}
set
{
(this[0] as SMPP.Variable.Binary).Value = value;
}
} /// <summary>
/// 请求返回结果
/// </summary>
public Int32 Status
{
get
{
return (this[1] as SMPP.Variable.Integer32).Value;
}
set
{
(this[1] as SMPP.Variable.Integer32).Value = value;
}
} }
}
下面是收到网关给SP的短信
case 0x00000003:
                    {
                        SMGPBody_Deliver bd = Pack.Body as SMGPBody_Deliver;                        SMGPBody_Deliver_Resp dr = new SMGPBody_Deliver_Resp();
                        dr.MsgID = bd.MsgID;
                        dr.Status = 0;                        SMGPPack pk = new SMGPPack(dr);
                        SendSMGP(pk);                        if (OnDeliver != null)
                        {
                            OnDeliver.BeginInvoke(this, bd.MsgID, bd.IsReport, bd.MsgFormat, bd.RecvTime, bd.SrcTermID, bd.DestTermID, bd.MsgContent, bd.Reserve, bd.TLVFields.GetArray(), null, null);
                        }                        break;
}
这个上面有问题,我看了协议和代码没有什么异常,请教高手指点?????????