Christian Hansen

NAME

Net::FastCGI::Record::BeginRequest - Object representation of a FCGI_BeginRequestRecord

SYNOPSIS

    # Constructors
    $record = Net::FastCGI::Record::BeginRequest->new($request_id, $role, $flags);
    $record = Net::FastCGI::Record::BeginRequest->parse($request_id, $octets);
    
    # Methods
    $role     = $record->get_role;
    $flags    = $record->get_flags;
    $boolean  = $record->is_responder;
    $boolean  = $record->is_authorizer;
    $boolean  = $record->is_filter;
    $boolean  = $record->should_keep_connection;

DESCRIPTION

INHERITANCE

Net::FastCGI::Record::BeginRequest extends Net::FastCGI::Record.

CONSTRUCTORS

new

Constructs an instance of Net::FastCGI::Record::BeginRequest.

Usage

    $record = Net::FastCGI::Record::BeginRequest->new($request_id, $role, $flags);

Arguments

$request_id

An unsigned 16-bit integer.

$role

An unsigned 16-bit integer.

$flags

An unsigned 8-bit integer.

Returns

$record

An instance of Net::FastCGI::Record::BeginRequest.

parse

Parses FCGI_BeginRequestBody.

Usage

    $record = Net::FastCGI::Record::BeginRequest->parse($request_id, $octets);

Arguments

$request_id

An unsigned 16-bit integer.

$octets

A string of octets containing the body, must be greater than or equal to 8 octets in length.

Returns

$record

An instance of Net::FastCGI::Record::BeginRequest.

METHODS

get_role

Usage

    $role = $record->get_role;

Returns

$role

An unsigned 16-bit integer.

get_flags

Usage

    $flags = $record->get_flags;

Returns

$flags

An unsigned 8-bit integer.

is_responder

Usage

    $boolean = $record->is_responder;

Returns

$boolean

A boolean indicating whether or not role is FCGI_RESPONDER.

is_authorizer

Usage

    $boolean = $record->is_authorizer;

Returns

$boolean

A boolean indicating whether or not role is FCGI_AUTHORIZER.

is_filter

Usage

    $boolean = $record->is_filter;

Returns

$boolean

A boolean indicating whether or not role is FCGI_FILTER.

should_keep_connection

Usage

    $boolean = $record->should_keep_connection;

Returns

$boolean

A boolean indicating whether or not flags has the FCGI_KEEP_CONN flag set.

EXPORTS

None.

SEE ALSO

http://www.fastcgi.com/devkit/doc/fcgi-spec.html#S5.1
Net::FastCGI::Record
"build_begin_request_record" in Net::FastCGI::Protocol
"build_begin_request_body" in Net::FastCGI::Protocol
"parse_begin_request_body" in Net::FastCGI::Protocol

AUTHOR

Christian Hansen chansen@cpan.org

COPYRIGHT

Copyright (c) 2008 Christian Hansen. All rights reserved.

This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.