namespace AsiaINFO.SMS.CMPP2
|
{
|
using System;
|
|
public class MessageEventArgs : EventArgs
|
{
|
private byte[] _BodyData;
|
private MessageHeader _Header;
|
private byte[] _HeaderData = new byte[12];
|
|
public MessageEventArgs(byte[] bytes)
|
{
|
Buffer.BlockCopy(bytes, 0, this._HeaderData, 0, 12);
|
this._Header = new MessageHeader(this._HeaderData);
|
this._BodyData = new byte[this._Header.Total_Length - 12];
|
Buffer.BlockCopy(bytes, 12, this._BodyData, 0, this._BodyData.Length);
|
}
|
|
public byte[] BodyData
|
{
|
get
|
{
|
return this._BodyData;
|
}
|
}
|
|
public MessageHeader Header
|
{
|
get
|
{
|
return this._Header;
|
}
|
}
|
|
public byte[] HeaderData
|
{
|
get
|
{
|
return this._HeaderData;
|
}
|
}
|
}
|
}
|