| Module | Mongo::Protocol::Serializers::Int32 |
| In: |
lib/mongo/protocol/serializers.rb
|
MongoDB wire protocol serialization strategy for 32-bit integers.
Serializes and de-serializes one 32-bit integer.
Deserializes a 32-bit Fixnum from the IO stream
@param [ String ] buffer Buffer containing the 32-bit integer
@return [ Fixnum ] Deserialized Int32
Serializes a fixnum to a 4-byte 32-bit integer
@param buffer [ String ] Buffer to receive the serialized Int32. @param value [ Fixnum ] 32-bit integer to be serialized.
@return [String] Buffer with serialized value.