{
    "mode": "perldoc",
    "parameter": "Net::Server::Thread",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Net%3A%3AServer%3A%3AThread/json",
    "generated": "2026-10-07T12:00:24Z",
    "synopsis": "use base qw(Net::Server::Thread);\nsub processrequest {\n#...code...\n}\nPACKAGE->run();",
    "sections": {
        "NAME": {
            "content": "Net::Server::Thread - Net::Server personality\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use base qw(Net::Server::Thread);\n\nsub processrequest {\n#...code...\n}\n\nPACKAGE->run();\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Please read the pod on Net::Server first. This module is a personality, or extension, or sub\nclass, of the Net::Server module.\n\nThis personality binds to one or more ports and then waits for a client connection. When a\nconnection is received, the server spawns a new thread. The thread handles the request and then\ncloses.\n\nBecause this Net::Server flavor spawns and destroys a thread for each request, it really should\nonly be used where the processing of each request may be lengthy or involved. If short and light\nrequest are used, perl may not voluntarily give back the used memory. This is highly system\ndependent.\n",
            "subsections": []
        },
        "ARGUMENTS": {
            "content": "checkfordead\nNumber of seconds to wait before looking for dead children. This only takes place if the\nmaximum number of child processes (maxservers) has been reached. Default is 60 seconds.\n\nmaxservers\nThe maximum number of children to fork. The server will not accept connections until there\nare free children. Default is 256 children.\n",
            "subsections": []
        },
        "CONFIGURATION FILE": {
            "content": "See Net::Server.\n",
            "subsections": []
        },
        "PROCESS FLOW": {
            "content": "Process flow follows Net::Server until the postaccept phase. At this point a child is forked.\nThe parent is immediately able to wait for another request. The child handles the request and\nthen exits.\n",
            "subsections": []
        },
        "HOOKS": {
            "content": "The Fork server has the following hooks in addition to the hooks provided by the Net::Server\nbase class. See Net::Server\n\n\"$self->preaccepthook()\"\nThis hook occurs just before the accept is called.\n\n\"$self->prethreadhook()\"\nThis hook occurs just after accept but before the fork.\n\n\"$self->postaccepthook()\"\nThis hook occurs in the child after the accept and fork.\n",
            "subsections": []
        },
        "TO DO": {
            "content": "See Net::Server\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Paul Seamons <paul@seamons.com>\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Please see also Net::Server::INET, Net::Server::Fork, Net::Server::PreFork,\nNet::Server::PreForkSimple, Net::Server::MultiType, Net::Server::SIG Net::Server::Single\n",
            "subsections": []
        }
    },
    "summary": "Net::Server::Thread - Net::Server personality",
    "flags": [],
    "examples": [],
    "see_also": []
}