{
    "content": [
        {
            "type": "text",
            "text": "# Net::Jabber::Server (perldoc)\n\n## NAME\n\nNet::Jabber::Server - Jabber Server Library\n\n## SYNOPSIS\n\nNet::Jabber::Server is a module that provides a developer easy access\nto developing applications that need an embedded Jabber server.\n\n## DESCRIPTION\n\nServer.pm seeks to provide enough high level APIs and automation of\nthe low level APIs that writing and spawning a Jabber Server in Perl\nis trivial.  For those that wish to work with the low level you can\ndo that too, but those functions are covered in the documentation for\neach module.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (1 subsections)\n- **METHODS** (1 subsections)\n- **AUTHOR**\n- **COPYRIGHT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Net::Jabber::Server",
        "section": "",
        "mode": "perldoc",
        "summary": "Net::Jabber::Server - Jabber Server Library",
        "synopsis": "Net::Jabber::Server is a module that provides a developer easy access\nto developing applications that need an embedded Jabber server.",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 16,
                "subsections": [
                    {
                        "name": "Basic Functions",
                        "lines": 13
                    }
                ]
            },
            {
                "name": "METHODS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Basic Functions",
                        "lines": 36
                    }
                ]
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 3,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Net::Jabber::Server - Jabber Server Library\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "Net::Jabber::Server is a module that provides a developer easy access\nto developing applications that need an embedded Jabber server.\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Server.pm seeks to provide enough high level APIs and automation of\nthe low level APIs that writing and spawning a Jabber Server in Perl\nis trivial.  For those that wish to work with the low level you can\ndo that too, but those functions are covered in the documentation for\neach module.\n\nNet::Jabber::Server provides functions to run a full Jabber server that\naccepts incoming connections and delivers packets to external Jabber\nservers.  You can use all or none of the functions, there is no requirement.\n\nFor more information on how the details for how Net::Jabber is written\nplease see the help for Net::Jabber itself.\n\nFor a full list of high level functions available please see\nNet::Jabber::Protocol.\n",
                "subsections": [
                    {
                        "name": "Basic Functions",
                        "content": "use Net::Jabber qw(Server);\n\n$Server = new Net::Jabber::Server();\n\n$Server->Start();\n$Server->Start(jabberxml=>\"customjabber.xml\",\nhostname=>\"foobar.net\");\n\n%status = $Server->Process();\n%status = $Server->Process(5);\n\n$Server->Stop();\n"
                    }
                ]
            },
            "METHODS": {
                "content": "",
                "subsections": [
                    {
                        "name": "Basic Functions",
                        "content": "new(debuglevel=>0|1|2, - creates the Server object.  debugfile\ndebugfile=>string,   should be set to the path for the debug\ndebugtime=>0|1)      log to be written.  If set to \"stdout\"\nthen the debug will go there.  debuglevel\ncontrols the amount of debug.  For more\ninformation about the valid setting for\ndebuglevel, debugfile, and debugtime see\nNet::Jabber::Debug.\n\nStart(hostname=>string, - starts the server listening on the proper\njaberxml=>string)   ports.  hostname is a quick way of telling\nthe server the hostname to listen on.\njabberxml defines the path to a different\njabberd configuration file (default is\n\"./jabber.xml\").\n\nProcess(integer) - takes the timeout period as an argument.  If no\ntimeout is listed then the function blocks until\na packet is received.  Otherwise it waits that\nnumber of seconds and then exits so your program\ncan continue doing useful things.  NOTE: This is\nimportant for GUIs.  You need to leave time to\nprocess GUI commands even if you are waiting for\npackets.  The following are the possible return\nvalues for each hash entry, and what they mean:\n\n1   - Status ok, data received.\n0   - Status ok, no data received.\nundef - Status not ok, stop processing.\n\nIMPORTANT: You need to check the output of every\nProcess.  If you get an undef then the connection\ndied and you should behave accordingly.\n\nStop() - stops the server from running and shuts down all sub programs.\n"
                    }
                ]
            },
            "AUTHOR": {
                "content": "By Ryan Eatmon in January of 2001 for http://jabber.org.\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "This module is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n",
                "subsections": []
            }
        }
    }
}