Class: PostgresPR::PasswordMessage

Inherits:
Message
  • Object
show all
Defined in:
lib/postgres-pr/message.rb

Constant Summary

Constants inherited from Message

Message::MsgTypeMap

Instance Method Summary collapse

Methods inherited from Message

create, dump, fields, read, register_message_type

Instance Method Details

#dumpObject



193
194
195
196
197
# File 'lib/postgres-pr/message.rb', line 193

def dump
  super(@password.size + 1) do |buffer|
    buffer.write_cstring(@password)
  end
end

#parse(buffer) ⇒ Object



199
200
201
202
203
# File 'lib/postgres-pr/message.rb', line 199

def parse(buffer)
  super do
    @password = buffer.read_cstring
  end
end