FCGI::Client::RecordHeader - record header object for FCGI


FCGI-Client documentation Contained in the FCGI-Client distribution.

Index


Code Index:

NAME

Top

FCGI::Client::RecordHeader - record header object for FCGI

SYNOPSIS

Top

    my $header = FCGI::Client::RecordHeader->new(raw => $raw);
    say $header->type;

DESCRIPTION

Top

This module is record header class for FCGI::Client.

ATTRIBUTES

Top

raw

the raw string of record header. size of record header is defined at FCGI::Client::Constant::FCGI_HEADER_LEN.

INSTANCE METHOD

Top

$self->request_id()
$self->type()
$self->content_length()
$self->padding_length()

These methods returns each field of record header.

SEE ALSO

Top

FCGI::Client


FCGI-Client documentation Contained in the FCGI-Client distribution.

package FCGI::Client::RecordHeader;
use Any::Moose;
use FCGI::Client::Constant;
has raw        => ( is => 'ro', isa => 'Str' );

sub content_length { unpack( 'x4n', $_[0]->raw ) }
sub padding_length { unpack( 'x6C', $_[0]->raw ) }
sub type           { unpack( 'xC',  $_[0]->raw ) }
sub request_id     { unpack( 'xxn', $_[0]->raw ) }

__PACKAGE__->meta->make_immutable;
__END__