From client code example at SubmitBatchMessages method my modified code look like this:
Code: Select all
for (int i = 0; i < count; i++)
{
//05 00 03 AB 02 02
byte[] aaa = new byte[6];
aaa[0] = 0x05;
aaa[1] = 0x00;
aaa[2] = 0x03;
aaa[3] = 0xAB;
aaa[4] = 0x02;
aaa[5] = 0x02;
UserDataHeader udh = new UserDataHeader();
udh.Data = aaa;
ISubmitSmBuilder builder = SMS.ForSubmit()
.Text(text)
.From(srcAdr, srcTon, srcNpi)
.To(dstAdr, dstTon, dstNpi)
.Coding(coding)
.Set(delegate(SubmitSm sm) { sm.Sequence = 12; })
.Set(delegate(SubmitSm sm) { sm.UserDataPdu.Headers.Add(udh); })
;
switch (mode)
{
case SubmitMode.Payload:
builder.MessageInPayload();
break;
case SubmitMode.ShortMessageWithSAR:
builder.ConcatenationInSAR();
break;
}
_client.SubmitAsync(builder);
Application.DoEvents();
}
How to delete leading three bytes?
* I know that Inetlab.SMPP can automatically concatenated messages but my situation is a different and I must submit each part of the concatenated with UDH and Text.
Thanks in advanced for any help,
Asaf