Class: Dcha::PacketManager

Inherits:
Hash
  • Object
show all
Defined in:
lib/dcha/packet_manager.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePacketManager

Returns a new instance of PacketManager.



6
7
8
# File 'lib/dcha/packet_manager.rb', line 6

def initialize
  @todo = Queue.new
end

Instance Attribute Details

#todoObject (readonly)

Returns the value of attribute todo.



4
5
6
# File 'lib/dcha/packet_manager.rb', line 4

def todo
  @todo
end

Instance Method Details

#<<(chunk) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/dcha/packet_manager.rb', line 10

def <<(chunk)
  self[chunk.tag] ||= []
  self[chunk.tag] << chunk
  self[chunk.tag].uniq!

  check(chunk)
end