Class: FCGI::BeginRequestRecord
- Defined in:
- lib/cgialt/fcgi/core.rb
Constant Summary collapse
- BODY_FORMAT =
uint16_t role; (big endian) uint8_t flags; uint8_t reserved;
'nCC5'
Constants inherited from Record
Record::HEADER_FORMAT, Record::HEADER_LENGTH, Record::RECORD_CLASS
Instance Attribute Summary collapse
-
#flags ⇒ Object
readonly
Returns the value of attribute flags.
-
#role ⇒ Object
readonly
Returns the value of attribute role.
Attributes inherited from Record
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id, role, flags) ⇒ BeginRequestRecord
constructor
A new instance of BeginRequestRecord.
- #make_body ⇒ Object
Methods inherited from Record
class_for, #management_record?, parse_header, #serialize, #version
Constructor Details
#initialize(id, role, flags) ⇒ BeginRequestRecord
Returns a new instance of BeginRequestRecord.
362 363 364 365 366 |
# File 'lib/cgialt/fcgi/core.rb', line 362 def initialize(id, role, flags) super FCGI_BEGIN_REQUEST, id @role = role @flags = flags end |
Instance Attribute Details
#flags ⇒ Object (readonly)
Returns the value of attribute flags.
369 370 371 |
# File 'lib/cgialt/fcgi/core.rb', line 369 def flags @flags end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
368 369 370 |
# File 'lib/cgialt/fcgi/core.rb', line 368 def role @role end |
Class Method Details
.parse(id, body) ⇒ Object
357 358 359 360 |
# File 'lib/cgialt/fcgi/core.rb', line 357 def self.parse(id, body) role, flags, *reserved = *body.unpack(BODY_FORMAT) new(id, role, flags) end |
Instance Method Details
#make_body ⇒ Object
371 372 373 |
# File 'lib/cgialt/fcgi/core.rb', line 371 def make_body [@role, @flags, 0, 0, 0, 0, 0].pack(BODY_FORMAT) end |