{
    "content": [
        {
            "type": "text",
            "text": "# FCGI (man)\n\n## NAME\n\nFCGI - Fast CGI module\n\n## SYNOPSIS\n\nuse FCGI;\nmy $count = 0;\nmy $request = FCGI::Request();\nwhile($request->Accept() >= 0) {\nprint(\"Content-type: text/html\\r\\n\\r\\n\", ++$count);\n}\n\n## DESCRIPTION\n\nFunctions:\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **LIMITATIONS**\n- **AUTHOR**\n- **COPYRIGHT AND LICENCE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "FCGI",
        "section": "",
        "mode": "man",
        "summary": "FCGI - Fast CGI module",
        "synopsis": "use FCGI;\nmy $count = 0;\nmy $request = FCGI::Request();\nwhile($request->Accept() >= 0) {\nprint(\"Content-type: text/html\\r\\n\\r\\n\", ++$count);\n}",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 95,
                "subsections": []
            },
            {
                "name": "LIMITATIONS",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT AND LICENCE",
                "lines": 8,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "FCGI - Fast CGI module\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use FCGI;\n\nmy $count = 0;\nmy $request = FCGI::Request();\n\nwhile($request->Accept() >= 0) {\nprint(\"Content-type: text/html\\r\\n\\r\\n\", ++$count);\n}\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Functions:\n\nFCGI::Request\nCreates a request handle. It has the following optional parameters:\n\ninput perl file handle (default: \\*STDIN)\noutput perl file handle (default: \\*STDOUT)\nerror perl file handle (default: \\*STDERR)\nThese filehandles will be setup to act as input/output/error on successful\nAccept.\n\nenvironment hash reference (default: \\%ENV)\nThe hash will be populated with the environment.\n\nsocket (default: 0)\nSocket to communicate with the server.  Can be the result of the OpenSocket\nfunction.  For the moment, it's the file descriptor of the socket that should be\npassed. This may change in the future.\n\nYou should only use your own socket if your program is not started by a process\nmanager such as modfastcgi (except for the FastCgiExternalServer case) or cgi-\nfcgi.  If you use the option, you have to let your FastCGI server know which port\n(and possibly server) your program is listening on.  See remote.pl for an\nexample.\n\nflags (default: FCGI::FAILACCEPTONINTR)\nPossible values:\n\nFCGI::FAILACCEPTONINTR\nIf set, Accept will fail if interrupted.  It not set, it will just\nkeep on waiting.\n\nExample usage:\nmy $req = FCGI::Request;\n\nor:\nmy %env;\nmy $in = new IO::Handle;\nmy $out = new IO::Handle;\nmy $err = new IO::Handle;\nmy $req = FCGI::Request($in, $out, $err, \\%env);\n\nFCGI::OpenSocket(path, backlog)\nCreates a socket suitable to use as an argument to Request.\n\npath    Pathname of socket or colon followed by local tcp port.  Note that some systems\ntake file permissions into account on Unix domain sockets, so you'll have to make\nsure that the server can write to the created file, by changing the umask before\nthe call and/or changing permissions and/or group of the file afterwards.\n\nbacklog Maximum length of the queue of pending connections.  If a connection request\narrives with the queue full the client may receive an  error  with  an\nindication of ECONNREFUSED.\n\nFCGI::CloseSocket(socket)\nClose a socket opened with OpenSocket.\n\n$req->Accept()\nAccepts a connection on $req, attaching the filehandles and populating the environment\nhash.  Returns 0 on success.  If a connection has been accepted before, the old one will\nbe finished first.\n\nNote that unlike with the old interface, no die and warn handlers are installed by\ndefault. This means that if you are not running an sfio enabled perl, any warn or die\nmessage will not end up in the server's log by default.  It is advised you set up die and\nwarn handlers yourself.  FCGI.pm contains an example of die and warn handlers.\n\n$req->Finish()\nFinishes accepted connection.  Also detaches filehandles.\n\n$req->Flush()\nFlushes accepted connection.\n\n$req->Detach()\nTemporarily detaches filehandles on an accepted connection.\n\n$req->Attach()\nRe-attaches filehandles on an accepted connection.\n\n$req->LastCall()\nTells the library not to accept any more requests on this handle.  It should be safe to\ncall this method from signal handlers.\n\nNote that this method is still experimental and everything about it, including its name,\nis subject to change.\n\n$env = $req->GetEnvironment()\nReturns the environment parameter passed to FCGI::Request.\n\n($in, $out, $err) = $req->GetHandles()\nReturns the file handle parameters passed to FCGI::Request.\n\n$isfcgi = $req->IsFastCGI()\nReturns whether or not the program was run as a FastCGI.\n",
                "subsections": []
            },
            "LIMITATIONS": {
                "content": "FCGI.pm isn't Unicode aware, only characters within the range 0x00-0xFF are supported.\nAttempts to output strings containing characters above 0xFF results in a exception: (F) \"Wide\ncharacter in %s\".\n\nUsers who wants the previous (FCGI.pm <= 0.68) incorrect behavior can disable the exception\nby using the \"bytes\" pragma.\n\n{\nuse bytes;\nprint \"\\x{263A}\";\n}\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Sven Verdoolaege <skimo@kotnet.org>\n",
                "subsections": []
            },
            "COPYRIGHT AND LICENCE": {
                "content": "This software is copyrighted (c) 1996 by by Open Market, Inc.\n\nSee the LICENSE file in this distribution for information on usage and redistribution of this\nfile, and for a DISCLAIMER OF ALL WARRANTIES.\n\n\n\nperl v5.34.0                                 2022-02-06                                    FCGI(3pm)",
                "subsections": []
            }
        }
    }
}