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.
359 360 361 362 363 |
# File 'lib/cgialt/fcgi/core.rb', line 359 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.
366 367 368 |
# File 'lib/cgialt/fcgi/core.rb', line 366 def flags @flags end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
365 366 367 |
# File 'lib/cgialt/fcgi/core.rb', line 365 def role @role end |
Class Method Details
.parse(id, body) ⇒ Object
354 355 356 357 |
# File 'lib/cgialt/fcgi/core.rb', line 354 def BeginRequestRecord.parse(id, body) role, flags, *reserved = *body.unpack(BODY_FORMAT) new(id, role, flags) end |
Instance Method Details
#make_body ⇒ Object
368 369 370 |
# File 'lib/cgialt/fcgi/core.rb', line 368 def make_body [@role, @flags, 0, 0, 0, 0, 0].pack(BODY_FORMAT) end |