Table of Contents

Migration from v1.x to 2.x

How to solve some compile issues:

SmppClient

  1. Missing BatchMonitor class. Use instead client.Submit(IEnumerable<SubmitSm> batch). It waits when all responses will be received for a batch.

  2. Events evBindComplete, evSubmitComplete, evQueryComplete were depricated. It is possible to use async await pattern or ContinueWith for corresponding Bind, Submit, Query methods.

  3. _client.AddressRange, _client.AddrNpi and _client.AddrTon must be specified as _client.EsmeAddress = new SmeAddress(AddressRange, AddrTon, AddrNpi);

  4. Sequence number and Command Status are moved to Header property of PDU.

  • data.Status replaced with data.Header.Status,
  • data.Sequence replaced with data.Header.Sequence
  1. client.GetMessageText is moved to client.EncodingMapper.GetMessageText

  2. PDU Properties

  • SourceAddrTon, SourceAddrNpi, SourceAddr replaced with SourceAddress of type SmeAddress
  • DestAddrTon, DestAddrNpi, DestAddr replaced with DestinationAddress of type SmeAddress
  • UserDataPdu replaced with UserData
  • Optional replaced with Parameters
  1. Property MessageText in SubmitSm, SubmitMulti, DeliverSm, DataSm, ReplaceSm classes is deprecated. Use the method pdu.GetMessageText(client.EncodingMapper).

  2. Method SmppClientBase.MapEncoding moved to SmppClientBase.EncodingMapper.MapEncoding

SmppServer

  1. Namespace for SmppServerClient class changed to Inetlab.SMPP.

  2. IPEndPoint of the server must be specified in SmppServer constructor, instead of Start method 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);