Method: Smpp::Base#initialize

Defined in:
lib/smpp/base.rb

#initialize(config, delegate) ⇒ Base

Returns a new instance of Base.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/smpp/base.rb', line 16

def initialize(config, delegate)
  @state = :unbound
  @config = config
  @data = ""
  @delegate = delegate
  @pdr_storage = pdr_storage={}

  # Array of un-acked MT message IDs indexed by sequence number.
  # As soon as we receive SubmitSmResponse we will use this to find the 
  # associated message ID, and then create a pending delivery report.
  @ack_ids = {}

  ed = @config[:enquire_link_delay_secs] || 5
  comm_inactivity_timeout = 2 * ed
end