Class: PostgresPR::SSLRequest
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
#dump ⇒ Object
499
500
501
502
503
504
505
506
|
# File 'lib/postgres-pr/message.rb', line 499
def dump
sz = 4 + 4
buffer = Buffer.of_size(sz)
buffer.write_int32_network(sz)
buffer.write_int32_network(@ssl_request_code)
raise DumpError unless buffer.at_end?
return buffer.content
end
|
#parse(buffer) ⇒ Object
508
509
510
511
512
|
# File 'lib/postgres-pr/message.rb', line 508
def parse(buffer)
buffer.position = 4
@ssl_request_code = buffer.read_int32_network
raise ParseError unless buffer.at_end?
end
|