{
    "mode": "perldoc",
    "parameter": "Net::Jabber::Protocol",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Net%3A%3AJabber%3A%3AProtocol/json",
    "generated": "2026-06-10T13:42:55Z",
    "synopsis": "Net::Jabber::Protocol is a module that provides a developer easy\naccess to the Jabber Instant Messaging protocol.  It provides high\nlevel functions to the Net::Jabber Client, Component, and Server\nobjects.  These functions are automatically indluded in those modules\nthrough AUTOLOAD and delegates.",
    "sections": {
        "NAME": {
            "content": "Net::Jabber::Protocol - Jabber Protocol Library\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "Net::Jabber::Protocol is a module that provides a developer easy\naccess to the Jabber Instant Messaging protocol.  It provides high\nlevel functions to the Net::Jabber Client, Component, and Server\nobjects.  These functions are automatically indluded in those modules\nthrough AUTOLOAD and delegates.\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Protocol.pm seeks to provide enough high level APIs and automation of\nthe low level APIs that writing a Jabber Client/Transport in Perl is\ntrivial.  For those that wish to work with the low level you can do\nthat too, but those functions are covered in the documentation for\neach module.\n\nNet::Jabber::Protocol provides functions to login, send and receive\nmessages, set personal information, create a new user account, manage\nthe roster, and disconnect.  You can use all or none of the functions,\nthere 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 more information on writing a Client see Net::Jabber::Client.\n\nFor more information on writing a Transport see Net::Jabber::Transport.\n",
            "subsections": [
                {
                    "name": "Modes",
                    "content": "Several of the functions take a mode argument that let you specify how\nthe function should behave:\n\nblock - send the packet with an ID, and then block until an answer\ncomes back.  You can optionally specify a timeout so that\nyou do not block forever.\n\nnonblock - send the packet with an ID, but then return that id and\ncontrol to the master program.  Net::Jabber is still\ntracking this packet, so you must use the CheckID function\nto tell when it comes in.  (This might not be very\nuseful...)\n\npassthru - send the packet with an ID, but do NOT register it with\nNet::Jabber, then return the ID.  This is useful when\ncombined with the XPath function because you can register\na one shot function tied to the id you get back.\n"
                },
                {
                    "name": "Basic Functions",
                    "content": "use Net::Jabber qw( Client );\n$Con = new Net::Jabber::Client();                # From\n$status = $Con->Connect(hostname=>\"jabber.org\"); # Net::Jabber::Client\n\nor\n\nuse Net::Jabber qw( Component );\n$Con = new Net::Jabber::Component();             #\n$status = $Con->Connect(hostname=>\"jabber.org\",  # From\nsecret=>\"bob\");          # Net::Jabber::Component\n\n\n#\n# For callback setup, see Net::XMPP::Protocol\n#\n\n$Con->Info(name=>\"Jarl\",\nversion=>\"v0.6000\");\n\nID Functions\n$id         = $Con->SendWithID($sendObj);\n$id         = $Con->SendWithID(\"<tag>XML</tag>\");\n$receiveObj = $Con->SendAndReceiveWithID($sendObj);\n$receiveObj = $Con->SendAndReceiveWithID($sendObj,\n10);\n$receiveObj = $Con->SendAndReceiveWithID(\"<tag>XML</tag>\");\n$receiveObj = $Con->SendAndReceiveWithID(\"<tag>XML</tag>\",\n5);\n$yesno      = $Con->ReceivedID($id);\n$receiveObj = $Con->GetID($id);\n$receiveObj = $Con->WaitForID($id);\n$receiveObj = $Con->WaitForID($id,\n20);\n\nIQ  Functions"
                },
                {
                    "name": "Agents Functions",
                    "content": "%agents = $Con->AgentsGet();\n%agents = $Con->AgentsGet(to=>\"transport.jabber.org\");\n"
                },
                {
                    "name": "Browse Functions",
                    "content": "%hash = $Con->BrowseRequest(jid=>\"jabber.org\");\n%hash = $Con->BrowseRequest(jid=>\"jabber.org\",\ntimeout=>10);\n\n$id = $Con->BrowseRequest(jid=>\"jabber.org\",\nmode=>\"nonblock\");\n\n$id = $Con->BrowseRequest(jid=>\"jabber.org\",\nmode=>\"passthru\");\n"
                },
                {
                    "name": "Browse DB Functions",
                    "content": "$Con->BrowseDBDelete(\"jabber.org\");\n$Con->BrowseDBDelete(Net::Jabber::JID);\n\n$presence  = $Con->BrowseDBQuery(jid=>\"bob\\@jabber.org\");\n$presence  = $Con->BrowseDBQuery(jid=>Net::Jabber::JID);\n$presence  = $Con->BrowseDBQuery(jid=>\"users.jabber.org\",\ntimeout=>10);\n$presence  = $Con->BrowseDBQuery(jid=>\"conference.jabber.org\",\nrefresh=>1);\n"
                },
                {
                    "name": "Bystreams Functions",
                    "content": "%hash = $Con->ByteStreamsProxyRequest(jid=>\"proxy.server\");\n%hash = $Con->ByteStreamsProxyRequest(jid=>\"proxy.server\",\ntimeout=>10);\n\n$id = $Con->ByteStreamsProxyRequest(jid=>\"proxy.server\",\nmode=>\"nonblock\");\n\n$id = $Con->ByteStreamsProxyRequest(jid=>\"proxy.server\",\nmode=>\"passthru\");\n\n\n%hash = $Con->ByteStreamsProxyParse($query);\n\n\n$status = $Con->ByteStreamsProxyActivate(sid=>\"streamid\",\njid=>\"proxy.server\");\n$status = $Con->ByteStreamsProxyActivate(sid=>\"streamid\",\njid=>\"proxy.server\",\ntimeout=>10);\n\n$id = $Con->ByteStreamsProxyActivate(sid=>\"streamid\",\njid=>\"proxy.server\",\nmode=>\"nonblock\");\n\n$id = $Con->ByteStreamsProxyActivate(sid=>\"streamid\",\njid=>\"proxy.server\",\nmode=>\"passthru\");\n\n\n$jid = $Con->ByteStreamsOffer(sid=>\"streamid\",\nstreamhosts=>[{jid=>\"jid\",\nhost=>\"host\",\nport=>\"port\",\nzeroconf=>\"zero\",\n},\n...\n],\njid=>\"bob\\@jabber.org\");\n$jid = $Con->ByteStreamsOffer(sid=>\"streamid\",\nstreamhosts=>[{},{},...],\njid=>\"bob\\@jabber.org\",\ntimeout=>10);\n\n$id = $Con->ByteStreamsOffer(sid=>\"streamid\",\nstreamhosts=>[{},{},...],\njid=>\"bob\\@jabber.org\",\nmode=>\"nonblock\");\n\n$id = $Con->ByteStreamsOffer(sid=>\"streamid\",\nstreamhosts=>[{},{},...],\njid=>\"bob\\@jabber.org\",\nmode=>\"passthru\");\n"
                },
                {
                    "name": "Disco Functions",
                    "content": "%hash = $Con->DiscoInfoRequest(jid=>\"jabber.org\");\n%hash = $Con->DiscoInfoRequest(jid=>\"jabber.org\",\nnode=>\"node...\");\n%hash = $Con->DiscoInfoRequest(jid=>\"jabber.org\",\nnode=>\"node...\",\ntimeout=>10);\n\n$id = $Con->DiscoInfoRequest(jid=>\"jabber.org\",\nmode=>\"nonblock\");\n$id = $Con->DiscoInfoRequest(jid=>\"jabber.org\",\nnode=>\"node...\",\nmode=>\"nonblock\");\n\n$id = $Con->DiscoInfoRequest(jid=>\"jabber.org\",\nmode=>\"passthru\");\n$id = $Con->DiscoInfoRequest(jid=>\"jabber.org\",\nnode=>\"node...\",\nmode=>\"passthru\");\n\n\n%hash = $Con->DiscoInfoParse($query);\n\n\n%hash = $Con->DiscoItemsRequest(jid=>\"jabber.org\");\n%hash = $Con->DiscoItemsRequest(jid=>\"jabber.org\",\ntimeout=>10);\n\n$id = $Con->DiscoItemsRequest(jid=>\"jabber.org\",\nmode=>\"nonblock\");\n\n$id = $Con->DiscoItemsRequest(jid=>\"jabber.org\",\nmode=>\"passthru\");\n\n\n%hash = $Con->DiscoItemsParse($query);\n"
                },
                {
                    "name": "Feature Negotiation Functions",
                    "content": "%hash = $Con->FeatureNegRequest(jid=>\"jabber.org\",\nfeatures=>{ feat1=>[\"opt1\",\"opt2\",...],\nfeat2=>[\"optA\",\"optB\",...]\n}\n);\n%hash = $Con->FeatureNegRequest(jid=>\"jabber.org\",\nfeatures=>{ ... },\ntimeout=>10);\n\n$id = $Con->FeatureNegRequest(jid=>\"jabber.org\",\nfeatures=>{ ... },\nmode=>\"nonblock\");\n\n$id = $Con->FeatureNegRequest(jid=>\"jabber.org\",\nfeatures=>{ ... },\nmode=>\"passthru\");\n\nmy $query = $self->FeatureNegQuery(\\{ ... });\n$iq->AddQuery($query);\n\n%hash = $Con->FeatureNegParse($query);\n"
                },
                {
                    "name": "File Transfer Functions",
                    "content": "$method = $Con->FileTransferOffer(jid=>\"bob\\@jabber.org\",\nsid=>\"streamid\",\nfilename=>\"/path/to/file\",\nmethods=>[\"http://jabber.org/protocol/si/profile/bytestreams\",\n\"jabber:iq:oob\",\n...\n]\n);\n$method = $Con->FileTransferOffer(jid=>\"bob\\@jabber.org\",\nsid=>\"streamid\",\nfilename=>\"/path/to/file\",\nmethods=>\\@methods,\ntimeout=>\"10\");\n\n$id = $Con->FileTransferOffer(jid=>\"bob\\@jabber.org\",\nsid=>\"streamid\",\nfilename=>\"/path/to/file\",\nmethods=>\\@methods,\nmode=>\"nonblock\");\n\n$id = $Con->FileTransferOffer(jid=>\"bob\\@jabber.org\",\nsid=>\"streamid\",\nfilename=>\"/path/to/file\",\nmethods=>\\@methods,\nmode=>\"passthru\");\n"
                },
                {
                    "name": "Last Functions",
                    "content": "$Con->LastQuery();\n$Con->LastQuery(to=>\"bob@jabber.org\");\n\n%result = $Con->LastQuery(mode=>\"block\");\n%result = $Con->LastQuery(to=>\"bob@jabber.org\",\nmode=>\"block\");\n\n%result = $Con->LastQuery(to=>\"bob@jabber.org\",\nmode=>\"block\",\ntimeout=>10);\n%result = $Con->LastQuery(mode=>\"block\",\ntimeout=>10);\n\n$Con->LastSend(to=>\"bob@jabber.org\");\n\n$seconds = $Con->LastActivity();\n"
                },
                {
                    "name": "Multi-User Chat Functions",
                    "content": "$Con->MUCJoin(room=>\"jabber\",\nserver=>\"conference.jabber.org\",\nnick=>\"nick\");\n\n$Con->MUCJoin(room=>\"jabber\",\nserver=>\"conference.jabber.org\",\nnick=>\"nick\",\npassword=>\"secret\");\n"
                },
                {
                    "name": "Register Functions",
                    "content": "@result = $Con->RegisterSendData(\"users.jabber.org\",\nfirst=>\"Bob\",\nlast=>\"Smith\",\nnick=>\"bob\",\nemail=>\"foo@bar.net\");\n\nRPC Functions\n$query = $Con->RPCEncode(type=>\"methodCall\",\nmethodName=>\"methodName\",\nparams=>[param,param,...]);\n$query = $Con->RPCEncode(type=>\"methodResponse\",\nparams=>[param,param,...]);\n$query = $Con->RPCEncode(type=>\"methodResponse\",\nfaultCode=>4,\nfaultString=>\"Too many params\");\n\n@response = $Con->RPCParse($iq);\n\n@response = $Con->RPCCall(to=>\"dataHouse.jabber.org\",\nmethodname=>\"numUsers\",\nparams=>[ param,param,... ]\n);\n\n$Con->RPCResponse(to=>\"you\\@jabber.org\",\nparams=>[ param,param,... ]);\n\n$Con->RPCResponse(to=>\"you\\@jabber.org\",\nfaultCode=>\"4\",\nfaultString=>\"Too many parameters\"\n);\n\n$Con->RPCSetCallBacks(myMethodA=>\\&methoda,\nmyMethodB=>\\&dosomthing,\netc...\n);\n"
                },
                {
                    "name": "Search Functions",
                    "content": "%fields = $Con->SearchRequest();\n%fields = $Con->SearchRequest(to=>\"users.jabber.org\");\n%fields = $Con->SearchRequest(to=>\"users.jabber.org\",\ntimeout=>10);\n\n$Con->SearchSend(to=>\"somewhere\",\nname=>\"\",\nfirst=>\"Bob\",\nlast=>\"\",\nnick=>\"bob\",\nemail=>\"\",\nkey=>\"some key\");\n\n$Con->SearchSendData(\"users.jabber.org\",\nfirst=>\"Bob\",\nlast=>\"\",\nnick=>\"bob\",\nemail=>\"\");\n"
                },
                {
                    "name": "Time Functions",
                    "content": "$Con->TimeQuery();\n$Con->TimeQuery(to=>\"bob@jabber.org\");\n\n%result = $Con->TimeQuery(mode=>\"block\");\n%result = $Con->TimeQuery(to=>\"bob@jabber.org\",\nmode=>\"block\");\n\n$Con->TimeSend(to=>\"bob@jabber.org\");\n"
                },
                {
                    "name": "Version Functions",
                    "content": "$Con->VersionQuery();\n$Con->VersionQuery(to=>\"bob@jabber.org\");\n\n%result = $Con->VersionQuery(mode=>\"block\");\n%result = $Con->VersionQuery(to=>\"bob@jabber.org\",\nmode=>\"block\");\n\n$Con->VersionSend(to=>\"bob@jabber.org\",\nname=>\"Net::Jabber\",\nver=>\"1.0a\",\nos=>\"Perl\");\n"
                }
            ]
        },
        "METHODS": {
            "content": "",
            "subsections": [
                {
                    "name": "Basic Functions",
                    "content": "Info(name=>string,    - Set some information so that Net::Jabber\nversion=>string)   can auto-reply to some packets for you to\nreduce the work you have to do.\n\nNOTE: This requires that you use the\nSetIQCallBacks methodology and not the\nSetCallBacks for <iq/> packets.\n\nIQ Functions"
                },
                {
                    "name": "Agents Functions",
                    "content": "*                              *\n* Deprecated in favor of Disco *\n*                              *\n\n\nAgentsGet(to=>string, - takes all of the information and\nAgentsGet()             builds a Net::Jabber::IQ::Agents packet.\nIt then sends that packet either to the\nserver, or to the specified transport,\nwith an ID and waits for that ID to return.\nThen it looks in the resulting packet and\nbuilds a hash that contains the values\nof the agent list.  The hash is layed out\nlike this:  (NOTE: the jid is the key to\ndistinguish the various agents)\n\n$hash{<JID>}->{order} = 4\n->{name} = \"ICQ Transport\"\n->{transport} = \"ICQ #\"\n->{description} = \"ICQ..blah..\"\n->{service} = \"icq\"\n->{register} = 1\n->{search} = 1\netc...\n\nThe order field determines the order that\nit came from the server in... in case you\ncare.  For more info on the valid fields\nsee the Net::Jabber::Query jabber:iq:agent\nnamespace.\n"
                },
                {
                    "name": "Browse Functions",
                    "content": "*                              *\n* Deprecated in favor of Disco *\n*                              *\n\n\nBrowseRequest(jid=>string, - sends a jabber:iq:browse request to\nmode=>string,  the jid passed as an argument.\ntimeout=>int)  Returns a hash with the resulting\ntree if mode is set to \"block\":\n\n$browse{'category'} = \"conference\"\n$browse{'children'}->[0]\n$browse{'children'}->[1]\n$browse{'children'}->[11]\n$browse{'jid'} = \"conference.jabber.org\"\n$browse{'name'} = \"Jabber.org Conferencing Center\"\n$browse{'ns'}->[0]\n$browse{'ns'}->[1]\n$browse{'type'} = \"public\"\n\nThe ns array is an array of the\nnamespaces that this jid supports.\nThe children array points to hashs\nof this form, and represent the fact\nthat they can be browsed to.\n\nSee MODES above for using the mode\nand timeout.\n"
                },
                {
                    "name": "Browse DB Functions",
                    "content": "BrowseDBDelete(string|Net::Jabber::JID) - delete thes JID browse\ndata from the DB.\n\nBrowseDBQuery(jid=>string | NJ::JID, - returns the browse data\ntimeout=>integer,        for the requested JID.  If\nrefresh=>0|1)            the DB does not contain\nthe data for the JID, then\nit attempts to fetch the\ndata via BrowseRequest().\nThe timeout is passed to\nthe BrowseRequest() call,\nand refresh tells the DB\nto request the data, even\nif it already has some.\n"
                },
                {
                    "name": "Bytestreams Functions",
                    "content": "ByteStreamsProxyRequest(jid=>string, - sends a bytestreams request\nmode=>string,  to the jid passed as an\ntimeout=>int)  argument.  Returns an array\nref with the resulting tree\nif mode is set to \"block\".\n\nSee ByteStreamsProxyParse\nfor the format of the\nresulting tree.\n\nSee MODES above for using\nthe mode and timeout.\n\nByteStreamsProxyParse(Net::Jabber::Query) - parses the query and\nreturns an array ref\nto the resulting tree:\n\n$host[0]->{jid} = \"bytestreams1.proxy.server\";\n$host[0]->{host} = \"proxy1.server\";\n$host[0]->{port} = \"5006\";\n$host[1]->{jid} = \"bytestreams2.proxy.server\";\n$host[1]->{host} = \"proxy2.server\";\n$host[1]->{port} = \"5007\";\n...\n\nByteStreamsProxyActivate(jid=>string, - sends a bytestreams activate\nsid=>string,   to the jid passed as an\nmode=>string,  argument.  Returns 1 if the\ntimeout=>int)  proxy activated (undef if\nit did not) if mode is set\nto \"block\".\n\nsid is the stream id that\nis being used to talk about\nthis stream.\n\nSee MODES above for using\nthe mode and timeout.\n\nByteStreamsOffer(jid=>string,         - sends a bytestreams offer\nsid=>string,           to the jid passed as an\nstreamhosts=>arrayref  argument.  Returns the jid\nmode=>string,          of the streamhost that the\ntimeout=>int)          user selected if mode is set\nto \"block\".\n\nstreamhosts is the same\nformat as the array ref\nreturned from\nByteStreamsProxyParse.\n\nSee MODES above for using\nthe mode and timeout.\n"
                },
                {
                    "name": "Disco Functions",
                    "content": "DiscoInfoRequest(jid=>string, - sends a disco#info request to\nnode=>string,  the jid passed as an argument,\nmode=>string,  and the node if specified.\ntimeout=>int)  Returns a hash with the resulting\ntree if mode is set to \"block\".\n\nSee DiscoInfoParse for the format\nof the resulting tree.\n\nSee MODES above for using the mode\nand timeout.\n\nDiscoInfoParse(Net::Jabber::Query) - parses the query and\nreturns a hash ref\nto the resulting tree:\n\n$info{identity}->[0]->{category} = \"groupchat\";\n$info{identity}->[0]->{name} = \"Public Chatrooms\";\n$info{identity}->[0]->{type} = \"public\";\n\n$info{identity}->[1]->{category} = \"groupchat\";\n$info{identity}->[1]->{name} = \"Private Chatrooms\";\n$info{identity}->[1]->{type} = \"private\";\n\n$info{feature}->{http://jabber.org/protocol/disco#info} = 1;\n$info{feature}->{http://jabber.org/protocol/muc#admin} = 1;\n\nDiscoItemsRequest(jid=>string, - sends a disco#items request to\nmode=>string,  the jid passed as an argument.\ntimeout=>int)  Returns a hash with the resulting\ntree if mode is set to \"block\".\n\nSee DiscoItemsParse for the format\nof the resulting tree.\n\nSee MODES above for using the mode\nand timeout.\n\nDiscoItemsParse(Net::Jabber::Query) - parses the query and\nreturns a hash ref\nto the resulting tree:\n\n$items{jid}->{node} = name;\n\n$items{\"proxy.server\"}->{\"\"} = \"Bytestream Proxy Server\";\n$items{\"conf.server\"}->{\"public\"} = \"Public Chatrooms\";\n$items{\"conf.server\"}->{\"private\"} = \"Private Chatrooms\";\n"
                },
                {
                    "name": "Feature Negotiation Functions",
                    "content": "FeatureNegRequest(jid=>string,       - sends a feature negotiation to\nfeatures=>hash ref,  the jid passed as an argument,\nmode=>string,        using the features specified.\ntimeout=>int)        Returns a hash with the resulting\ntree if mode is set to \"block\".\n\nSee DiscoInfoQuery for the format\nof the features hash ref.\n\nSee DiscoInfoParse for the format\nof the resulting tree.\n\nSee MODES above for using the mode\nand timeout.\n\nFeatureNegParse(Net::Jabber::Query) - parses the query and\nreturns a hash ref\nto the resulting tree:\n\n$features->{feat1} = [\"opt1\",\"opt2\",...];\n$features->{feat2} = [\"optA\",\"optB\",...];\n....\n\nIf this is a result:\n\n$features->{feat1} = \"opt2\";\n$features->{feat2} = \"optA\";\n....\n\nFeatureNeqQuery(hash ref) - takes a hash ref and turns it into a\nfeature negotiation query that you can\nAddQuery into your packaet.  The format\nof the hash ref is as follows:\n\n$features->{feat1} = [\"opt1\",\"opt2\",...];\n$features->{feat2} = [\"optA\",\"optB\",...];\n....\n"
                },
                {
                    "name": "File Transfer Functions",
                    "content": "FileTransferOffer(jid=>string,         - sends a file transfer stream\nsid=>string,           initiation to the jid passed\nfilename=>string,      as an argument.  Returns the\nmode=>string,          method (if the users accepts),\ntimeout=>int)          undef (if the user declines),\nif the mode is set to \"block\".\n\nSee MODES above for using\nthe mode and timeout.\n"
                },
                {
                    "name": "Last Functions",
                    "content": "LastQuery(to=>string,     - asks the jid specified for its last\nmode=>string,     activity.  If the to is blank, then it\ntimeout=>int)     queries the server.  Returns a hash with\nLastQuery()                 the various items set if mode is set to\n\"block\":\n\n$last{seconds} - Seconds since activity\n$last{message} - Message for activity\n\nSee MODES above for using the mode\nand timeout.\n\nLastSend(to=>string, - sends the specified last to the specified jid.\nhash)         the hash is the seconds and message as shown\nin the Net::Jabber::Query man page.\n\nLastActivity() - returns the number of seconds since the last activity\nby the user.\n"
                },
                {
                    "name": "Multi-User Chat Functions",
                    "content": "MUCJoin(room=>string,    - Sends the appropriate MUC protocol to join\nserver=>string,    the specified room with the specified nick.\nnick=>string,\npassword=>string)\n"
                },
                {
                    "name": "Register Functions",
                    "content": "RegisterSendData(string|JID, - takes the contents of the hash and\nhash)         builds a jabebr:x:data return packet\nwhich it sends in a Net::Jabber::Query\njabber:iq:register namespace packet.\nThe first argument is the JID to send\nthe packet to.  This function returns\nan array that looks like this:\n\n[ type , message ]\n\nIf type is \"ok\" then registration was\nsuccessful, otherwise message contains\na little more detail about the error.\n\nRPC Functions\nRPCParse(IQ object) - returns an array.  The first argument tells\nthe status \"ok\" or \"fault\".  The second\nargument is an array if \"ok\", or a hash if\n\"fault\".\n\nRPCCall(to=>jid|string,     - takes the methodName and params,\nmethodName=>string,   builds the RPC calls and sends it\nparams=>array,        to the specified address.  Returns\nmode=>string,         the above data from RPCParse.\ntimeout=>int)\nSee MODES above for using the mode\nand timeout.\n\nRPCResponse(to=>jid|string,      - generates a response back to\nparams=>array,         the caller.  If any part of\nfaultCode=>int,        fault is specified, then it\nfaultString=>string)   wins.\n\n\nNote: To ensure that you get the correct type for a param sent\nback, you can specify the type by prepending the type to\nthe value:\n\n\"i4:5\" or \"int:5\"\n\"boolean:0\"\n\"string:56\"\n\"double:5.0\"\n\"datetime:20020415T11:11:11\"\n\"base64:....\"\n\nRPCSetCallBacks(method=>function, - sets the callback functions\nmethod=>function,   for the specified methods.\netc...)             The method comes from the\n<methodName/> and is case\nsensitive.  The single\narguemnt is a ref to an\narray that contains the\n<params/>.  The function you\nwrite should return one of two\nthings:\n\n[\"ok\", [...] ]\n\nThe [...] is a list of the\n<params/> you want to return.\n\n[\"fault\", {faultCode=>1,\nfaultString=>...} ]\n\nIf you set the function to undef,\nthen the method is removed from\nthe list.\n"
                },
                {
                    "name": "Search Functions",
                    "content": "SearchRequest(to=>string,  - send an <iq/> request to the specified\nmode=>string,  server/transport, if not specified it\ntimeout=>int)  sends to the current active server.\nSearchRequest()              The function returns a hash that\ncontains the required fields.   Here\nis an example of the hash:\n\n$hash{fields}    - The raw fields from\nthe iq:register.  To\nbe used if there is\nno x:data in the\npacket.\n$hash{instructions} - How to fill out\nthe form.\n$hash{form}   - The new dynamic forms.\n\nIn $hash{form}, the fields that are\npresent are the required fields the\nserver needs.\n\nSee MODES above for using the mode\nand timeout.\n\nSearchSend(to=>string|JID, - takes the contents of the hash and\nhash)             passes it to the SetSearch function\nin the Net::Jabber::Query\njabber:iq:search namespace.  And then\nsends the packet.\n\nSearchSendData(string|JID, - takes the contents of the hash and\nhash)         builds a jabebr:x:data return packet\nwhich it sends in a Net::Jabber::Query\njabber:iq:search namespace packet.\nThe first argument is the JID to send\nthe packet to.\n"
                },
                {
                    "name": "Time Functions",
                    "content": "TimeQuery(to=>string,     - asks the jid specified for its localtime.\nmode=>string,     If the to is blank, then it queries the\ntimeout=>int)     server.  Returns a hash with the various\nTimeQuery()                 items set if mode is set to \"block\":\n\n$time{utc}     - Time in UTC\n$time{tz}      - Timezone\n$time{display} - Display string\n\nSee MODES above for using the mode\nand timeout.\n\nTimeSend(to=>string) - sends the current UTC time to the specified\njid.\n"
                },
                {
                    "name": "Version Functions",
                    "content": "VersionQuery(to=>string,     - asks the jid specified for its\nmode=>string,     client version information.  If the\ntimeout=>int)     to is blank, then it queries the\nVersionQuery()                 server.  Returns ahash with the\nvarious items set if mode is set to\n\"block\":\n\n$version{name} - Name\n$version{ver}  - Version\n$version{os}   - Operating System/\nPlatform\n\nSee MODES above for using the mode\nand timeout.\n\nVersionSend(to=>string,   - sends the specified version information\nname=>string,   to the jid specified in the to.\nver=>string,\nos=>string)\n"
                }
            ]
        },
        "AUTHOR": {
            "content": "Ryan Eatmon\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": []
        }
    },
    "summary": "Net::Jabber::Protocol - Jabber Protocol Library",
    "flags": [],
    "examples": [],
    "see_also": []
}