Module: EM::APNS::Server
- Defined in:
- lib/em-apns/server.rb
Instance Method Summary collapse
Instance Method Details
#post_init ⇒ Object
3 4 5 6 |
# File 'lib/em-apns/server.rb', line 3 def post_init @@queue ||= ConnectionPool.new.queue @buf ||= "" end |
#receive_data(data) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/em-apns/server.rb', line 8 def receive_data(data) @buf << data while line = @buf.slice!(/.+\r?\n/) do @@queue.push(line.gsub(/\r?\n/, '')) end end |