lib/mongo/protocol/msg.rb
# Serializes message into bytes that can be sent on the wire.
#
# @param [ BSON::ByteBuffer ] buffer where the message should be inserted.
# @param [ Integer ] max_bson_size The maximum bson object size.
#
# @return [ BSON::ByteBuffer ] buffer containing the serialized message.
#
# @since 2.5.0
Serializes message into bytes that can be sent on the wire.
Serializes message into bytes that can be sent on the wire .
def serialize(buffer = BSON::ByteBuffer.new, max_bson_size = nil, bson_overhead = nil)
        validate_document_size!(max_bson_size)
        super
        add_check_sum(buffer)
        buffer
      end
def serialize ( buffer = BSON :: ByteBuffer . new , max_bson_size = nil , bson_overhead = nil ) validate_document_size! ( max_bson_size ) super add_check_sum ( buffer ) buffer end
Serializes message into bytes that can be sent on the wire.
Serializes message into bytes that can be sent on the wire .
buffer containing the serialized message.
buffer containing the serialized message .
 BSON::ByteBuffer 
buffer
<not_specific>
new
<not_specific>
max_bson_size
<not_specific>
bson_overhead
<not_specific>
<not_specific>
max_bson_size The maximum bson object size.
max_bson_size The maximum bson object size .
since
None