Navigation Menu

Skip to content

Commit

Permalink
Add examples of possible message types
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 28, 2015
1 parent 75ee4f2 commit 0f52200
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/droonga/fluent_message_receiver.rb
Expand Up @@ -253,13 +253,13 @@ def handle_feeded_object(object)
raise InvalidObject.new(object) unless tag.is_a?(String)

case object[1]
when String # PackedForward message
when String # PackedForward message [tag, "packed entries"]
raise InvalidObject.new(object) unless object.size == 2
entries = MessagePack.unpack(object[1])
when Array # Forward message
when Array # Forward message [tag, [entry, entry...]]
raise InvalidObject.new(object) unless object.size == 2
entries = object[1]
when Integer, Float # Message message
when Integer, Float # Message message [tag, time, record]
raise InvalidObject.new(object) unless object.size == 3
entries = [[object[1], object[2]]]
else
Expand Down

0 comments on commit 0f52200

Please sign in to comment.