GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NET::FASTCGI::CONSTANT (3)

.ds Aq ’

NAME

Net::FastCGI::Constant - FastCGI protocol constants.

CONTENTS

DESCRIPTION

FastCGI protocol constants.

CONSTANTS

Constants can either be imported individually or in sets grouped by tag names. The tag names are:

CW:common

FCGI_MAX_CONTENT_LEN Maximum number of octets that the content component of the record can hold. (65535)
FCGI_HEADER_LEN Number of octets in FCGI_Header. (8)
FCGI_VERSION_1 Value for version component of FCGI_Header. (1)
FCGI_NULL_REQUEST_ID Value for request_id component of FCGI_Header. (0)

CW:type

Values for type component of FCGI_Header.
FCGI_BEGIN_REQUEST
FCGI_ABORT_REQUEST
FCGI_END_REQUEST
FCGI_PARAMS
FCGI_STDIN
FCGI_STDOUT
FCGI_STDERR
FCGI_DATA
FCGI_GET_VALUES
FCGI_GET_VALUES_RESULT
FCGI_UNKNOWN_TYPE
FCGI_MAXTYPE

CW:flag

Mask for flags component of FCGI_BeginRequestBody.
FCGI_KEEP_CONN

CW:role

Values for role component of FCGI_BeginRequestBody.
FCGI_RESPONDER
FCGI_AUTHORIZER
FCGI_FILTER

CW:protocol_status

Values for protocol_status component of FCGI_EndRequestBody.
FCGI_REQUEST_COMPLETE
FCGI_CANT_MPX_CONN
FCGI_OVERLOADED
FCGI_UNKNOWN_ROLE

CW:value

Variable names for FCGI_GET_VALUES / FCGI_GET_VALUES_RESULT records.
FCGI_MAX_CONNS
FCGI_MAX_REQS
FCGI_MPXS_CONNS

CW:pack

pack() / unpack() templates
FCGI_Header


    Octet/      0        |        1        |
        /                |                 |
       | 0 1 2 3 4 5 6 7 | 0 1 2 3 4 5 6 7 |
       +-----------------+-----------------+
     0 |     Version     |      Type       |
       +-----------------+-----------------+
     2 |             Request ID            |
       +-----------------+-----------------+
     4 |          Content Length           |
       +-----------------+-----------------+
     6 | Padding Length  |    Reserved     |
       +-----------------+-----------------+
       Total 8 octets

    Template: CCnnCx

    my ($version, $type, $request_id, $content_length, $padding_length)
      = unpack(FCGI_Header, $octets);



FCGI_BeginRequestBody


    Octet/      0        |        1        |
        /                |                 |
       | 0 1 2 3 4 5 6 7 | 0 1 2 3 4 5 6 7 |
       +-----------------+-----------------+
     0 |                Role               |
       +-----------------+-----------------+
     2 |      Flags      |                 |
       +-----------------+                 +
     4 |                                   |
       +              Reserved             +
     6 |                                   |
       +-----------------+-----------------+
       Total 8 octets

    Template: nCx5

    my ($role, $flags) = unpack(FCGI_BeginRequestBody, $octets);



FCGI_EndRequestBody


    Octet/      0        |        1        |
        /                |                 |
       | 0 1 2 3 4 5 6 7 | 0 1 2 3 4 5 6 7 |
       +-----------------+-----------------+
     0 |                                   |
       +        Application Status         +
     2 |                                   |
       +-----------------+-----------------+
     4 | Protocol Status |                 |
       +-----------------+    Reserved     +
     6 |                                   |
       +-----------------+-----------------+
       Total 8 octets

    Template: NCx3

    my ($app_status, $protocol_status)
      = unpack(FCGI_EndRequestBody, $octets);



FCGI_UnknownTypeBody


    Octet/      0        |        1        |
        /                |                 |
       | 0 1 2 3 4 5 6 7 | 0 1 2 3 4 5 6 7 |
       +-----------------+-----------------+
     0 |  Unknown Type   |                 |
       +-----------------+                 +
     2 |                                   |
       +                                   +
     4 |              Reserved             |
       +                                   +
     6 |                                   |
       +-----------------+-----------------+
       Total 8 octets

    Template: Cx7

    my $unknown_type = unpack(FCGI_UnknownTypeBody, $octets);



CW:name

Arrays containing names of value components. These are read-only.
@FCGI_TYPE_NAME


    print $FCGI_TYPE_NAME[FCGI_BEGIN_REQUEST]; # FCGI_BEGIN_REQUEST



@FCGI_ROLE_NAME


    print $FCGI_ROLE_NAME[FCGI_RESPONDER]; # FCGI_RESPONDER



@FCGI_PROTOCOL_STATUS_NAME


    print $FCGI_PROTOCOL_STATUS_NAME[FCGI_OVERLOADED]; # FCGI_OVERLOADED



Note

It’s not safe to assume that exists works for validation purposes, index 0 might be undef.

Use boolean context instead:



    ($FCGI_TYPE_NAME[$type])
      || die;



EXPORTS

None by default. All functions can be exported using the :all tag or individually.

SEE ALSO

<http://www.fastcgi.com/devkit/doc/fcgi-spec.html>

AUTHOR

Christian Hansen chansen@cpan.org

COPYRIGHT

Copyright 2008-2010 by Christian Hansen.

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

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NET::FASTCGI::CONSTANT (3) 2010-04-21

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.