Module
Module documentation.
moduleprotocol.fastcgi
Classes
Classes and inheritance.
Functions
Free functions and class methods.
functionprotocol.fastcgi::version_1
Signature
func version_1() -> Intfunc version_1() -> Int {
return 1;
}@briefProvides the system library operation `version_1`.
@detailsExecutes the `version_1` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.fastcgi::begin_request_type
Signature
func begin_request_type() -> Intfunc begin_request_type() -> Int {
return 1;
}@briefProvides the system library operation `begin_request_type`.
@detailsExecutes the `begin_request_type` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.fastcgi::abort_request_type
Signature
func abort_request_type() -> Intfunc abort_request_type() -> Int {
return 2;
}@briefProvides the system library operation `abort_request_type`.
@detailsExecutes the `abort_request_type` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.fastcgi::end_request_type
Signature
func end_request_type() -> Intfunc end_request_type() -> Int {
return 3;
}@briefProvides the system library operation `end_request_type`.
@detailsExecutes the `end_request_type` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.fastcgi::params_type
Signature
func params_type() -> Intfunc params_type() -> Int {
return 4;
}@briefProvides the system library operation `params_type`.
@detailsExecutes the `params_type` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.fastcgi::stdin_type
Signature
func stdin_type() -> Intfunc stdin_type() -> Int {
return 5;
}@briefProvides the system library operation `stdin_type`.
@detailsExecutes the `stdin_type` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.fastcgi::stdout_type
Signature
func stdout_type() -> Intfunc stdout_type() -> Int {
return 6;
}@briefProvides the system library operation `stdout_type`.
@detailsExecutes the `stdout_type` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.fastcgi::stderr_type
Signature
func stderr_type() -> Intfunc stderr_type() -> Int {
return 7;
}@briefProvides the system library operation `stderr_type`.
@detailsExecutes the `stderr_type` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.fastcgi::data_type
Signature
func data_type() -> Intfunc data_type() -> Int {
return 8;
}@briefProvides the system library operation `data_type`.
@detailsExecutes the `data_type` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.fastcgi::get_values_type
Signature
func get_values_type() -> Intfunc get_values_type() -> Int {
return 9;
}@briefReads the state or data for `get_values_type`.
@detailsExecutes the `get_values_type` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.fastcgi::get_values_result_type
Signature
func get_values_result_type() -> Intfunc get_values_result_type() -> Int {
return 10;
}@briefReads the state or data for `get_values_result_type`.
@detailsExecutes the `get_values_result_type` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.fastcgi::unknown_type
Signature
func unknown_type() -> Intfunc unknown_type() -> Int {
return 11;
}@briefProvides the system library operation `unknown_type`.
@detailsExecutes the `unknown_type` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.fastcgi::responder_role
Signature
func responder_role() -> Intfunc responder_role() -> Int {
return 1;
}@briefProvides the system library operation `responder_role`.
@detailsExecutes the `responder_role` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.fastcgi::authorizer_role
Signature
func authorizer_role() -> Intfunc authorizer_role() -> Int {
return 2;
}@briefProvides the system library operation `authorizer_role`.
@detailsExecutes the `authorizer_role` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.fastcgi::filter_role
Signature
func filter_role() -> Intfunc filter_role() -> Int {
return 3;
}@briefProvides the system library operation `filter_role`.
@detailsExecutes the `filter_role` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.fastcgi::request_complete
Signature
func request_complete() -> Intfunc request_complete() -> Int {
return 0;
}@briefProvides the system library operation `request_complete`.
@detailsExecutes the `request_complete` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.fastcgi::cant_mpx_conn
Signature
func cant_mpx_conn() -> Intfunc cant_mpx_conn() -> Int {
return 1;
}@briefProvides the system library operation `cant_mpx_conn`.
@detailsExecutes the `cant_mpx_conn` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.fastcgi::overloaded
Signature
func overloaded() -> Intfunc overloaded() -> Int {
return 2;
}@briefProvides the system library operation `overloaded`.
@detailsExecutes the `overloaded` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.fastcgi::unknown_role
Signature
func unknown_role() -> Intfunc unknown_role() -> Int {
return 3;
}@briefProvides the system library operation `unknown_role`.
@detailsExecutes the `unknown_role` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.fastcgi::default_request_id
Signature
func default_request_id() -> Intfunc default_request_id() -> Int {
return 1;
}@briefProvides the system library operation `default_request_id`.
@detailsExecutes the `default_request_id` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.fastcgi::default_timeout_ms
Signature
func default_timeout_ms() -> Intfunc default_timeout_ms() -> Int {
return 10000;
}@briefProvides the system library operation `default_timeout_ms`.
@detailsExecutes the `default_timeout_ms` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.fastcgi::max_content_len
Signature
func max_content_len() -> Intfunc max_content_len() -> Int {
return 65535;
}@briefProvides the system library operation `max_content_len`.
@detailsExecutes the `max_content_len` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.fastcgi::byte
Signature
func byte(code: Int) -> Stringfunc byte(code: Int) -> String {
return encoding.byte_from_code(code & 255);
}@briefProvides the system library operation `byte`.
@detailsExecutes the `byte` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- codeNumeric status, error, signal, opcode, or platform code handled by this API.
@returnReturns the operation result as `String`.
functionprotocol.fastcgi::byte_at
Signature
func byte_at(s: String, idx: Int) -> Intfunc byte_at(s: String, idx: Int) -> Int {
if idx < 0 || idx >= std.len(s) {
return 0;@briefProvides the system library operation `byte_at`.
@detailsExecutes the `byte_at` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- sInput string.
- idxZero-based index.
@returnReturns the operation result as `Int`.
functionprotocol.fastcgi::u16_be
Signature
func u16_be(v: Int) -> Stringfunc u16_be(v: Int) -> String {
return byte((v >> 8) & 255) + byte(v & 255);
}@briefProvides the system library operation `u16_be`.
@detailsExecutes the `u16_be` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- vValue argument consumed, stored, encoded, compared, or forwarded by this API.
@returnReturns the operation result as `String`.
functionprotocol.fastcgi::u32_be
Signature
func u32_be(v: Int) -> Stringfunc u32_be(v: Int) -> String {
return byte((v >> 24) & 255) + byte((v >> 16) & 255) + byte((v >> 8) & 255) + byte(v & 255);
}@briefProvides the system library operation `u32_be`.
@detailsExecutes the `u32_be` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- vValue argument consumed, stored, encoded, compared, or forwarded by this API.
@returnReturns the operation result as `String`.
functionprotocol.fastcgi::read_u16_be
Signature
func read_u16_be(s: String, off: Int) -> Intfunc read_u16_be(s: String, off: Int) -> Int {
return (byte_at(s, off) << 8) | byte_at(s, off + 1);
}@briefReads data with `read_u16_be`.
@detailsExecutes the `read_u16_be` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- sInput string.
- offZero-based byte offset or element offset at which the operation starts.
@returnReturns the operation result as `Int`.
functionprotocol.fastcgi::read_u32_be
Signature
func read_u32_be(s: String, off: Int) -> Intfunc read_u32_be(s: String, off: Int) -> Int {
return (byte_at(s, off) << 24) | (byte_at(s, off + 1) << 16) | (byte_at(s, off + 2) << 8) | byte_at(s, off + 3);
}@briefReads data with `read_u32_be`.
@detailsExecutes the `read_u32_be` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- sInput string.
- offZero-based byte offset or element offset at which the operation starts.
@returnReturns the operation result as `Int`.
functionprotocol.fastcgi::encode_len
Signature
func encode_len(n: Int) -> Stringfunc encode_len(n: Int) -> String {
if n < 0 {
return "";@briefEncodes input data with `encode_len`.
@detailsExecutes the `encode_len` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- nCount, size, or limit value.
@returnReturns the operation result as `String`.
functionprotocol.fastcgi::make_record
Signature
func make_record(record_type: Int, request_id: Int, content: String) -> Stringfunc make_record(record_type: Int, request_id: Int, content: String) -> String {
let n = std.len(content);
let header = byte(version_1())@briefProvides the system library operation `make_record`.
@detailsExecutes the `make_record` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- record_typeFastCGI or protocol record type value encoded into the frame header.
- request_idProtocol request identifier used to correlate frames, commands, or responses.
- contentContent bytes or text used as a message, file body, or protocol payload.
@returnReturns the operation result as `String`.
functionprotocol.fastcgi::make_begin_request
Signature
func make_begin_request(request_id: Int, role: Int, keep_conn: Bool) -> Stringfunc make_begin_request(request_id: Int, role: Int, keep_conn: Bool) -> String {
let flags = 0;
if keep_conn {@briefProvides the system library operation `make_begin_request`.
@detailsExecutes the `make_begin_request` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- request_idProtocol request identifier used to correlate frames, commands, or responses.
- roleServer role, user role, or protocol role selected by the operation.
- keep_connWhether the connection should remain open after the request completes.
@returnReturns the operation result as `String`.
functionprotocol.fastcgi::make_empty_record
Signature
func make_empty_record(record_type: Int, request_id: Int) -> Stringfunc make_empty_record(record_type: Int, request_id: Int) -> String {
return make_record(record_type, request_id, "");
}@briefProvides the system library operation `make_empty_record`.
@detailsExecutes the `make_empty_record` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- record_typeFastCGI or protocol record type value encoded into the frame header.
- request_idProtocol request identifier used to correlate frames, commands, or responses.
@returnReturns the operation result as `String`.
functionprotocol.fastcgi::chunk_len
Signature
func chunk_len(total_len: Int, off: Int) -> Intfunc chunk_len(total_len: Int, off: Int) -> Int {
let take = total_len - off;
if take > max_content_len() {@briefProvides the system library operation `chunk_len`.
@detailsExecutes the `chunk_len` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- total_lenSize or length value that limits how much data the operation processes.
- offZero-based byte offset or element offset at which the operation starts.
@returnReturns the operation result as `Int`.
functionprotocol.fastcgi::encode_params
Signature
func encode_params(params: collections.Map<String, String>) -> Stringfunc encode_params(params: collections.Map<String, String>) -> String {
let keys = params.keys();
let out = "";@briefEncodes input data with `encode_params`.
@detailsExecutes the `encode_params` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- paramsName/value parameter map encoded into the request or protocol message.
@returnReturns the operation result as `String`.
functionprotocol.fastcgi::make_params
Signature
func make_params(script_filename: String, request_method: String, query_string: String, content_type: String, content_length: Int) -> collections.Map<String, String>func make_params(script_filename: String, request_method: String, query_string: String, content_type: String, content_length: Int) -> collections.Map<String, String> {
let params = new collections.Map<String, String>();
_ = params.set("GATEWAY_INTERFACE", "CGI/1.1");@briefProvides the system library operation `make_params`.
@detailsExecutes the `make_params` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- script_filenameFilesystem path of the script file executed by the FastCGI backend.
- request_methodHTTP method name associated with the FastCGI or HTTP request.
- query_stringRaw query string component included in a CGI, HTTP, or URL request.
- content_typeMIME content type associated with the request or response body.
- content_lengthSize or length value that limits how much data the operation processes.
@returnReturns the operation result as `collections.Map<String, String>`.
Variables
Class fields (var).