Class: PostgresPR::BackendKeyData

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



228
229
230
231
232
233
# File 'lib/postgres-pr/message.rb', line 228

def dump
  super(4 + 4) do |buffer|
    buffer.write_int32_network(@process_id)
    buffer.write_int32_network(@secret_key)
  end 
end

#parse(buffer) ⇒ Object



235
236
237
238
239
240
# File 'lib/postgres-pr/message.rb', line 235

def parse(buffer)
  super do
    @process_id = buffer.read_int32_network
    @secret_key = buffer.read_int32_network
  end
end