Get the full PDU before sending a message?

Post Reply
AG70
Posts: 15
Joined: Sun May 19, 2013 5:48 pm

Get the full PDU before sending a message?

Post by AG70 » Wed Apr 29, 2020 1:04 pm

Hi,

How to get the full Submit PDU before

Code: Select all

_client.SubmitAsync(builder)
or after is at

Code: Select all

IList<SubmitSmResp> resp
Thanks,
AG
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: Get the full PDU before sending a message?

Post by alt » Wed Apr 29, 2020 1:25 pm

you can create PDU list from builder.

Code: Select all

var pduList = builder.Create(_client);
Please note, this creates PDU instances with Header.Sequence = 0. The sequence will be generated when you call SubmitAsync method. You can also generate next one with _client.SequenceGenerator.
AG70
Posts: 15
Joined: Sun May 19, 2013 5:48 pm

Re: Get the full PDU before sending a message?

Post by AG70 » Wed Apr 29, 2020 2:51 pm

Hi,
Thanks for your help.
I am looking for the full PDU like for example UCS2 PDU: 0000003F00000004000000000000000C000101393732353036333838383633000101393732353432303038303830000000000000000008000605D005D005D0
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: Get the full PDU before sending a message?

Post by alt » Wed Apr 29, 2020 3:55 pm

You can use Serialize extension method
https://docs.inetlab.com/smpp/v2.8/api/ ... dingMapper_

Code: Select all

byte[] data = pdu.Serialize(_client.EncodingMapper);
AG70
Posts: 15
Joined: Sun May 19, 2013 5:48 pm

Re: Get the full PDU before sending a message?

Post by AG70 » Wed Apr 29, 2020 6:31 pm

Hi,

Many Thanks for your help.

AG
Post Reply