Serialize

.NET library for SMPP protocol
Post Reply
stevep
Posts: 27
Joined: Wed May 02, 2007 7:41 pm

Serialize

Post by stevep » Tue May 30, 2017 11:21 am

Hi alt,

I am looking to accept Sms from in to a web api which may be scheduled at some time in the future. Withing the web api I want to create the Sms using the new builder methods IList Inetlab.SMPP.SMS.ForSubmit() and store each of the SubmitSm's for later submission.

I am thinking to simply extract resulting SubmitSm's and store the bytes to a database and recreate them for sending when their scheduled time is due. I have tried extracting the sm.UserDataPdu.ShortMessage's to a byte array however when I convert them back to a SubmitSm they are not complete.

Is there a simple method to achieve this ?

Steve

alt
Site Admin
Posts: 727
Joined: Tue Apr 25, 2006 9:45 am

Re: Serialize

Post by alt » Wed May 31, 2017 3:04 pm

Please try following methods:

Code: Select all

byte[] SubmitSM.Serialize(SubmitSM submit)
SubmitSM SubmitSM.Deserialize(byte[] data)

stevep
Posts: 27
Joined: Wed May 02, 2007 7:41 pm

Re: Serialize

Post by stevep » Thu Jun 01, 2017 11:05 am

Awesome, thank you.

Post Reply