module Mongo::Protocol::Serializers::CString
MongoDB wire protocol serialization strategy for C style strings.
Serializes and de-serializes C style strings (null terminated).
Public Class Methods
Source
# File lib/mongo/protocol/serializers.rb, line 80 def self.serialize(buffer, value, validating_keys = BSON::Config.validating_keys?) buffer.put_cstring(value) end
Serializes a C style string into the buffer
@param buffer [ String ] Buffer to receive the serialized CString
. @param value [ String ] The string to be serialized.
@return [ String ] Buffer with serialized value.