Net::Ja...::Server(3)
π Net::Ja...::Server(3) π
okay bestie, this is the Net::Ja...::Server(3) page from the User Contributed Perl Documentation. We're doing the whole thing, no skipped sections, no cap. β¨
πΈ NAME πΈ
Net::Jabber::Server β Jabber Server Library.
β¨ SYNOPSIS β¨
Net::Jabber::Server is a module that provides a developer easy access
to developing applications that need an embedded Jabber server.
π¦ DESCRIPTION π¦
okay so Server.pm is out here trying to give you enough high level APIs and automation of the low level APIs that writing and spawning a Jabber Server in Perl is trivial. If you're the kind of dev who wants to work with the low level directly, you can absolutely do that too β those functions are covered in the documentation for each module. iykyk.
Net::Jabber::Server provides functions to run a full Jabber server that accepts incoming connections and delivers packets to external Jabber servers. You can use all of the functions or none of them β there is no requirement. main character energy, honestly.
If you want more information on the details for how Net::Jabber is written, please see the help for Net::Jabber itself.
For a full list of high level functions available, please see Net::Jabber::Protocol.
π Basic Functions π
use Net::Jabber qw(Server);
$Server = new Net::Jabber::Server();
$Server->Start();
$Server->Start(jabberxml=>"custom_jabber.xml",
hostname=>"foobar.net");
%status = $Server->Process();
%status = $Server->Process(5);
$Server->Stop();
π₯ METHODS π₯
π Basic Functions π
new(debuglevel=>0|1|2, debugfile=>string, debugtime=>0|1)β creates the Server object.debugfileshould be set to the path for the debug log to be written. If set to"stdout"then the debug will go there.debuglevelcontrols the amount of debug. For more information about the valid setting fordebuglevel,debugfile, anddebugtime, seeNet::Jabber::Debug.Start(hostname=>string, jaberxml=>string)β starts the server listening on the proper ports.hostnameis a quick way of telling the server the hostname to listen on.jabberxmldefines the path to a differentjabberdconfiguration file (default is"./jabber.xml").Process(integer)β takes the timeout period as an argument. If no timeout is listed then the function blocks until a packet is received. Otherwise it waits that number of seconds and then exits so your program can continue doing useful things. NOTE: This is important for GUIs. You need to leave time to process GUI commands even if you are waiting for packets. The following are the possible return values for each hash entry, and what they mean:1β Status ok, data received.0β Status ok, no data received.undefβ Status not ok, stop processing.
IMPORTANT: You need to check the output of every Process. If you get an undef then the connection died and you should behave accordingly. no pressure, but like, pressure. π
Stop()β stops the server from running and shuts down all sub programs.
π AUTHOR π
By Ryan Eatmon in January of 2001 for http://jabber.org.
π COPYRIGHT π
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
This page is from perl v5.42.2, dated 2026-02-15 β catch you in the group chat, bestie ππ«Ά
π¦ where this page comes from
- alpine 3.24: perl-net-jabber-doc 2.0-r1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms