Banner showing base of Eiffel tower

Github

Download version 1.4.8: Windows or Linux

Network Library: Fast CGI Protocol

This library cluster has 29 classes.

ECF: fast-cgi.ecf

This implemenation of the Fast CGI protocol allows you to create Fast-CGI services that service HTTP requests forwarded by a web server via a local network socket.

Each service implements a table of servlets to service particular requests. The service is configured from a Pyxis format configuration file and listens either on a port number or a Unix socket for request from the web server.

This API has been tested in production with the Cherokee Web Server Ver. 1.2.101

Directory: library/network/fast-cgi

. /imp_mswin/socket

. /imp_unix/socket

. /request

. /request/record

. /service

. /support

imp_mswin/socket

FCGI_SOCKET_FACTORY

Windows implemenation of socket factory for FCGI service

imp_unix/socket

FCGI_DEBUGGING_STREAM_SOCKET

Socket that can help debug network protocols

FCGI_SOCKET_FACTORY

Unix implemenation of socket factory for FCGI service

request

FCGI_CONSTANTS

Fast-CGI constants

FCGI_HTTP_HEADERS

Fast-CGI HTTP headers and custom headers

Further Information

Click on class link to see client examples.

FCGI_MEMORY_READER_WRITER

Memory reader/writer that can read Name-Value pair length encoded according to the Fast-CGI specification.

See: https://fast-cgi.github.io/spec#34-name-value-pairs

FCGI_RECORD_TYPE_ENUM

Enumeration of Fast-CGI header record types.

#define FCGI_BEGIN_REQUEST       1
#define FCGI_ABORT_REQUEST       2
#define FCGI_END_REQUEST         3
#define FCGI_PARAMS              4
#define FCGI_STDIN               5
#define FCGI_STDOUT              6
#define FCGI_STDERR              7
#define FCGI_DATA                8
#define FCGI_GET_VALUES          9
#define FCGI_GET_VALUES_RESULT  10
#define FCGI_UNKNOWN_TYPE       11

FCGI_REQUEST_BROKER

Broker object used to communicate with the web server across a supplied socket using the FastCGI binary protocol. It reads HTTP requests and write responses.

Further Information

Click on class link to see notes.

FCGI_REQUEST_PARAMETERS

HTTP parameters passed throught Fast CGI connection and set reflectively

Further Information

Click on class link to see notes and client examples.

FCGI_SHARED_RECORD_TYPE

Fast-CGI shared record type enumeration

request/record

FCGI_BEGIN_REQUEST_RECORD

The Web server sends a FCGI_BEGIN_REQUEST record to start a request. The contentData component of a FCGI_BEGIN_REQUEST record has the form:

typedef struct {
   unsigned char roleB1;
   unsigned char roleB0;
   unsigned char flags;
   unsigned char reserved[5];
} FCGI_BeginRequestBody;

See: https://fast-cgi.github.io/spec#51-fcgi_begin_request

FCGI_DEFAULT_RECORD

Default record indicating unknown request

FCGI_END_REQUEST_RECORD

The application sends a FCGI_END_REQUEST record to terminate a request, either because the application has processed the request or because the application has rejected the request.

The contentData component of a FCGI_END_REQUEST record has the form:

typedef struct {
   unsigned char appStatusB3;
   unsigned char appStatusB2;
   unsigned char appStatusB1;
   unsigned char appStatusB0;
   unsigned char protocolStatus;
   unsigned char reserved[3];
} FCGI_EndRequestBody;

FCGI_END_SERVICE_RECORD

The application sends a FCGI_END_REQUEST record to terminate a request, either because the application has processed the request or because the application has rejected the request.

FCGI_HEADER_RECORD

A FastCGI record consists of a fixed-length prefix followed by a variable number of content and padding bytes. See: https://fast-cgi.github.io/spec#33-records

typedef struct {
   unsigned char version;
   unsigned char type;
   unsigned char requestIdB1;
   unsigned char requestIdB0;
   unsigned char contentLengthB1;
   unsigned char contentLengthB0;
   unsigned char paddingLength;
   unsigned char reserved;
   unsigned char contentData[contentLength];
   unsigned char paddingData[paddingLength];
} FCGI_Record;

FCGI_PARAMETER_RECORD

FCGI_PARAMS is a stream record type used in sending name-value pairs from the Web server to the application. The name-value pairs are sent down the stream one after the other, in no specified order.

See: https://fast-cgi.github.io/spec#52-name-value-pair-streams-fcgi_params

FCGI_RECORD

Base class for reading and writing a Fast-CGI record

FCGI_STDOUT_CONTENT_RECORD

Content record for writing content to web server

FCGI_STRING_CONTENT_RECORD

FCGI_STDIN is a stream record type used in sending arbitrary data from the Web server to the application. FCGI_DATA is a second stream record type used to send additional data to the application.

FCGI_STDOUT and FCGI_STDERR are stream record types for sending arbitrary data and error data respectively from the application to the Web server.

See: https://fast-cgi.github.io/spec#53-byte-streams-fcgi_stdin-fcgi_data-fcgi_stdout-fcgi_stderr

service

FCGI_APPLICATION_COMMAND

Base class for FCGI_SERVLET_SERVICE

FCGI_HTTP_SERVLET

Fast-CGI HTTP servlet

FCGI_SEPARATE_SERVLET_SERVICE

A FCGI_SERVLET_SERVICE service operating in a separate thread.

FCGI_SERVICE_CONFIG

Servlet service configuration parsed from Pyxis format

Further Information

Click on class link to see notes.

FCGI_SERVLET_REQUEST

Fast-CGI servlet request

FCGI_SERVLET_RESPONSE

Fcgi servlet response

FCGI_SERVLET_SERVICE

Fast-CGI service that services HTTP requests forwarded by a web server from a table of servlets. The service is configured from a Pyxis format configuration file and listens either on a port number or a Unix socket for request from the web server.

Further Information

Click on class link to see notes.

FCGI_SETTABLE_FROM_SERVLET_REQUEST

Object that is reflectively settable from {FCGI_SERVLET_REQUEST}.method_parameters

support

FCGI_HEADER_ENUMERATION

Fast-CGI header enumeration

FCGI_SHARED_HEADER

Shared header keys