Class: XGen::Mongo::Driver::GetMoreMessage

Inherits:
Message
  • Object
show all
Defined in:
lib/mongo/message/get_more_message.rb

Constant Summary

Constants inherited from Message

Message::HEADER_SIZE

Instance Attribute Summary

Attributes inherited from Message

#buf

Instance Method Summary collapse

Methods inherited from Message

#dump, #to_a, #update_message_length, #write_doc, #write_int, #write_long, #write_string

Constructor Details

#initialize(db_name, collection_name, cursor) ⇒ GetMoreMessage

Returns a new instance of GetMoreMessage.



26
27
28
29
30
31
32
# File 'lib/mongo/message/get_more_message.rb', line 26

def initialize(db_name, collection_name, cursor)
  super(OP_GET_MORE)
  write_int(0)
  write_string("#{db_name}.#{collection_name}")
  write_int(0)              # num to return; leave it up to the db for now
  write_long(cursor)
end