www.pudn.com > FeeGateWaySrv.rar   To Read all the content


[file head]:
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using System.Security.Cryptography;
using System.Collections;
using GateWayFroCMPP3;

namespace CMPP3.Client
{
#region <事件代理与事件数据定义>
/// <summary>
/// 由于内部异常,与网关的数据传输已经中断,此事件请求重新建立连接
/// </summary>
public delegate void RequestRestartEventHandler(object sender,System.EventArgs e);
/// <summary>
/// 接收到状态报告事件代理
/// </summary>
public delegate void RecvReportEventHandler(object sender, ReportEventArgs e);
/// <summary>
/// 接收到新短消息事件代理
/// </summary>
public delegate void RecvSMSEnventHandler(object sender, SMSEventArgs e);
/// <summary>
/// 接收到网关终止信号事件代理
/// </summary>
public delegate void RecvTerminateEventHandler(object sender,TerminateEventArgs e);
/// <summary>
/// 接收到对网关请求终止信号回应的事件代理
/// </summary>
public delegate void RecvTerminateRespEventHa
... ...

[file tail]:
... ...
P);
head.MSGLength=24;
this.bsValue=new byte[24];
}
/// <summary>
/// 设置此消息的MsgID
/// </summary>
public byte[] bsMsgID
{
set
{
this.bsmsgid=new byte[8];
value.CopyTo(bsmsgid,0);
this.ulmsgid=BIConverter.BytesToUlong(this.bsmsgid);
}
}
/// <summary>
/// 设置此消息的MsgID
/// </summary>
public ulong ulMsgID
{
set
{
this.ulmsgid=value;
this.bsmsgid=BIConverter.UlongToBytes(this.ulmsgid);
}
}
/// <summary>
/// 设置此消息的Result
/// </summary>
public uint Result
{
set
{
this.uresult=value;
}
}
public Header Head
{
get
{
return this.head;
}
}
public byte[] ToBytes()
{
head.ToBytes().CopyTo(this.bsValue,0);
this.bsmsgid.CopyTo(this.bsValue,12);
BIConverter.UIntToBytes(this.uresult).CopyTo(this.bsValue,20);
return this.bsValue;
}
}
}

#endregion
}