Perl XMPP 解析模块-Net::XMPP
2014-07-20 10:11:15 阿炯

本站赞助商链接,请多关照。 Net::XMPP - XMPP Perl Library


Net::XMPP provides a Perl user with access to the Extensible Messaging and Presence Protocol (XMPP).

该模块为perl用户提供了处理xmpp协议的诸多底层方法,可以从web或cmd操作界面中处理xmpp信息。

Net::XMPP is a convenient tool to use for any perl script that would like to utilize the XMPP Instant Messaging protocol. While not a client in and of itself, it provides all of the necessary back-end functions to make a CGI client or command-line perl client feasible and easy to use. Net::XMPP is a wrapper around the rest of the official Net::XMPP::xxxxxx packages.

另外还有一个fork于Net::XMPP的模块:Net::XMPP3,据称它修正了一个在与ejabberd服务器交互时的bug,其它方面并无变化。

它将与XMPP协议相关的功能分为子模块进行了实现,相关的子模块有:
Net::XMPP::Client
Contains the code needed to communicate with an XMPP server: login, wait for messages, send messages, and logout. It uses XML::Stream to read the stream from the server and based on what kind of tag it encounters it calls a function to handle the tag.


Net::XMPP::Protocol
A collection of high-level functions that Client uses to make their lives easier. These methods are inherited by the Client.


Net::XMPP::JID
The XMPP IDs consist of three parts: user id, server, and resource.This module gives you access to those components without having to parse the string yourself.


Net::XMPP::Message
Everything needed to create and read a <message/> received from the server.


Net::XMPP::Presence
Everything needed to create and read a <presence/> received from the server.


Net::XMPP::IQ
IQ is a wrapper around a number of modules that provide support for the various Info/Query namespaces that XMPP recognizes.


Net::XMPP::Stanza
This module represents a namespaced stanza that is used to extend a <message/>, <presence/>, and <iq/>.
 
The man page for Net::XMPP::Stanza contains a listing of all supported namespaces, and the methods that are supported by the objects that represent those namespaces.


Net::XMPP::Namespaces
XMPP allows for any stanza to be extended by any bit of XML. This module contains all of the internals for defining the XMPP based extensions defined by the IETF. The documentation for this module explains more about how to add your own custom namespace and have it be supported.


最新版本:1.0


项目主页:https://metacpan.org/release/Net-XMPP