In Files

Parent

FCGI::Record

Constants

HEADER_FORMAT

uint8_t protocol_version; uint8_t record_type; uint16_t request_id; (big endian) uint16_t content_length; (big endian) uint8_t padding_length; uint8_t reserved;

HEADER_LENGTH
RECORD_CLASS

Attributes

type[R]
request_id[R]

Public Class Methods

class_for(type) click to toggle source
     # File lib/fcgi.rb, line 313
313:       def self::class_for(type)
314:         RECORD_CLASS[type]
315:       end
new(type, reqid) click to toggle source
     # File lib/fcgi.rb, line 317
317:       def initialize(type, reqid)
318:         @type = type
319:         @request_id = reqid
320:       end
parse_header(buf) click to toggle source
     # File lib/fcgi.rb, line 309
309:       def self::parse_header(buf)
310:         return *buf.unpack(HEADER_FORMAT)
311:       end

Public Instance Methods

management_record?() click to toggle source
     # File lib/fcgi.rb, line 329
329:       def management_record?
330:         @request_id == FCGI_NULL_REQUEST_ID
331:       end
serialize() click to toggle source
     # File lib/fcgi.rb, line 333
333:       def serialize
334:         body = make_body()
335:         padlen = body.length % 8
336:         header = make_header(body.length, padlen)
337:         header + body + "\0000" * padlen
338:       end
version() click to toggle source
     # File lib/fcgi.rb, line 322
322:       def version
323:         ::FCGI::ProtocolVersion
324:       end

Private Instance Methods

make_header(clen, padlen) click to toggle source
     # File lib/fcgi.rb, line 342
342:       def make_header(clen, padlen)
343:         [version(), @type, @request_id, clen, padlen, 0].pack(HEADER_FORMAT)
344:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.