Migration from v1.x to 2.x
How to solve some compile issues:
SmppClient
Missing
BatchMonitorclass. Use insteadclient.Submit(IEnumerable<SubmitSm> batch). It waits when all responses will be received for a batch.Events
evBindComplete,evSubmitComplete,evQueryCompletewere depricated. It is possible to use async await pattern or ContinueWith for correspondingBind,Submit,Querymethods._client.AddressRange,_client.AddrNpiand_client.AddrTonmust be specified as_client.EsmeAddress = new SmeAddress(AddressRange, AddrTon, AddrNpi);Sequence number and Command Status are moved to Header property of PDU.
data.Statusreplaced withdata.Header.Status,data.Sequencereplaced withdata.Header.Sequence
client.GetMessageTextis moved toclient.EncodingMapper.GetMessageTextPDU Properties
SourceAddrTon,SourceAddrNpi,SourceAddrreplaced withSourceAddressof typeSmeAddressDestAddrTon,DestAddrNpi,DestAddrreplaced withDestinationAddressof typeSmeAddressUserDataPdureplaced withUserDataOptionalreplaced withParameters
Property
MessageTextinSubmitSm,SubmitMulti,DeliverSm,DataSm,ReplaceSmclasses is deprecated. Use the methodpdu.GetMessageText(client.EncodingMapper).Method
SmppClientBase.MapEncodingmoved toSmppClientBase.EncodingMapper.MapEncoding
SmppServer
Namespace for
SmppServerClientclass changed toInetlab.SMPP.IPEndPoint of the server must be specified in
SmppServerconstructor, instead ofStartmethod of this class.
Serialization
Method submitSm.Serialize can be replaced with extension method:
byte[] pduData = submitSm.Serialize(client.EncodingMapper);
Static method SubmitSm.Deserialize can be replaced with code:
byte[] pduData = ...;
SubmitSm pdu = pduData.Deserialize<SubmitSm>(client.EncodingMapper);