.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Net::Jabber::Server 3pm" .TH Net::Jabber::Server 3pm "2022-06-16" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Net::Jabber::Server \- Jabber Server Library .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& Net::Jabber::Server is a module that provides a developer easy access \& to developing applications that need an embedded Jabber server. .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" .Vb 5 \& Server.pm seeks to provide enough high level APIs and automation of \& the low level APIs that writing and spawning a Jabber Server in Perl \& is trivial. For those that wish to work with the low level you can \& do that too, but those functions are covered in the documentation for \& each module. \& \& 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 or none of the functions, there is no requirement. \& \& For more information on how 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. .Ve .SS "Basic Functions" .IX Subsection "Basic Functions" .Vb 1 \& 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(); .Ve .SH "METHODS" .IX Header "METHODS" .SS "Basic Functions" .IX Subsection "Basic Functions" .Vb 8 \& new(debuglevel=>0|1|2, \- creates the Server object. debugfile \& debugfile=>string, should be set to the path for the debug \& debugtime=>0|1) log to be written. If set to "stdout" \& then the debug will go there. debuglevel \& controls the amount of debug. For more \& information about the valid setting for \& debuglevel, debugfile, and debugtime see \& Net::Jabber::Debug. \& \& Start(hostname=>string, \- starts the server listening on the proper \& jaberxml=>string) ports. hostname is a quick way of telling \& the server the hostname to listen on. \& jabberxml defines the path to a different \& jabberd configuration 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. \& \& Stop() \- stops the server from running and shuts down all sub programs. .Ve .SH "AUTHOR" .IX Header "AUTHOR" By Ryan Eatmon in January of 2001 for http://jabber.org. .SH "COPYRIGHT" .IX Header "COPYRIGHT" This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.