| Module | Mongo::Protocol::Serializers::Header |
| In: |
lib/mongo/protocol/serializers.rb
|
MongoDB wire protocol serialization strategy for message headers.
Serializes and de-serializes four 32-bit integers consisting of the length of the message, the request id, the response id, and the op code for the operation.
Deserializes the header value from the IO stream
@param [ String ] buffer Buffer containing the message header.
@return [ Array<Fixnum> ] Array consisting of the deserialized
length, request id, response id, and op code.
Serializes the header value into the buffer
@param buffer [ String ] Buffer to receive the serialized value. @param value [ String ] Header value to be serialized.
@return [ String ] Buffer with serialized value.