ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Net-XMPP2/README
Revision: 1.6
Committed: Wed Jul 25 13:53:32 2007 UTC (17 years, 8 months ago) by elmex
Branch: MAIN
Changes since 1.5: +7 -7 lines
Log Message:
implemented OOB and fixed bugs in Disco and further developed in band registration.

File Contents

# User Rev Content
1 elmex 1.1 NAME
2     Net::XMPP2 - An implementation of the XMPP Protocol
3    
4     VERSION
5 elmex 1.5 Version 0.03
6 elmex 1.1
7     SYNOPSIS
8 elmex 1.2 use Net::XMPP2::Connection;
9    
10     or:
11    
12     use Net::XMPP2::IM::Connection;
13    
14 elmex 1.3 or:
15    
16     use Net::XMPP2::Client;
17    
18 elmex 1.2 DESCRIPTION
19     This is the head module of the Net::XMPP2 XMPP client protocol (as
20     described in RFC 3920 and RFC 3921) framework.
21    
22     Net::XMPP2::Connection is a RFC 3920 conformant "XML" stream
23 elmex 1.4 implementation for clients, which handles TCP connect up to the resource
24     binding. And provides low level access to the XML nodes on the XML
25 elmex 1.2 stream along with some high level methods to send the predefined XML
26     stanzas.
27    
28 elmex 1.4 Net::XMPP2::IM::Connection is a more high level module, which is derived
29 elmex 1.2 from Net::XMPP2::Connection. It handles all the instant messaging client
30     functionality described in RFC 3921.
31    
32 elmex 1.3 Net::XMPP2::Client is a multi account client class. It manages
33 elmex 1.4 connections to multiple XMPP accounts and tries to offer a nice high
34     level interface to XMPP communication.
35 elmex 1.3
36 elmex 1.4 For a list of "Supported extensions" see below.
37 elmex 1.2
38     There are also other modules in this distribution, for example:
39 elmex 1.3 Net::XMPP2::Util, Net::XMPP2::Writer, Net::XMPP2::Parser and those I
40 elmex 1.2 forgot :-) Those modules might be helpful and/or required if you want to
41     use this framework for XMPP.
42    
43     See also Net::XMPP2::Writer for a discussion about the brokeness of XML
44     in the XMPP specification.
45    
46 elmex 1.3 If you have any questions or seek for help look below under "SUPPORT".
47    
48     REQUIREMENTS
49     One of the major drawbacks I see for Net::XMPP2 is the long list of
50     required modules to make it work.
51    
52     AnyEvent
53     For the I/O events and timers.
54    
55     XML::Writer
56     For writing "XML".
57    
58     XML::Parser::Expat
59     For parsing partial "XML" stuff.
60    
61     MIME::Base64
62     For SASL authentication
63    
64     Authen::SASL
65     For SASL authentication
66    
67     Net::LibIDN
68     For stringprep profiles to handle JIDs.
69    
70     Net::SSLeay
71     For SSL connections.
72    
73     Net::DNS
74     For SRV RR lookups.
75    
76 elmex 1.5 Digest::SHA1
77     For component authentication.
78    
79 elmex 1.4 And yes, all these are essential for XMPP communication. Even though
80 elmex 1.3 'instant messaging' and 'presence' is a quite simple problem XMPP
81 elmex 1.4 somehow was successful at making the task complicated enough to keep me
82     busy for a long time. But all of that time wasn't only for the
83     technology required to get it started, mostly it was for all the quirks,
84     hacks and badly applied "XML" in the protocol which complicated the
85     matter.
86 elmex 1.3
87     RELEASE NOTES
88     Here are some notes to the releases (release of this version is at top):
89    
90     Version
91 elmex 1.5 * 0.03
92     This release adds new events for attaching information to "XML"
93     stanzas that are in transmission to the server. See also the events
94     "send_*_hook" in Net::XMPP2::Connection.
95    
96     The event callbacks als don't have to return a true value anymore.
97     What the return values do depends on the event now.
98    
99     The highlight of this release is the implementation of XEP-0114, the
100     Jabber Component Protocol.
101    
102 elmex 1.6 It's possible to get a DOM tree from a Net::XMPP2::Node now and also
103     to receive the original parsed "XML" from it, which should enable
104     full access to the "XML" data that was received. This also allows
105     easy integration with other XML Perl modules.
106    
107 elmex 1.5 You can also set the initial priority of the presence in
108     Net::XMPP2::IM::Connection now.
109    
110     Please consult the Changes file for greater detail about bugfixes
111     and new features.
112    
113 elmex 1.4 * 0.02
114 elmex 1.5 This release adds lots of small improvements to the API (mostly new
115 elmex 1.4 events), and also some bugfixes here and there. The release also
116     comes with some new examples, you might want to take a look at the
117     "EXAMPLES" section.
118    
119     As a highlight I also present the implementation of XEP-0004 (Data
120     Forms), see also Net::XMPP2::Ext for a description.
121    
122     I also added some convenience functions to Net::XMPP2::Util, for
123     example "simxml" which simplifies the generation of XMPP-like "XML".
124    
125 elmex 1.3 * 0.01
126     This release has beta status. The code is already used daily in my
127     client and I keep looking out for bugs. If you find undocumented,
128     missing or faulty code/methods please drop me a mail! See also
129     "BUGS" below.
130    
131     Potential edges when using this module: sparely documented methods,
132 elmex 1.4 missing functionality and generally bugs bugs and bugs. Even though
133 elmex 1.3 this module is in daily usage there are still lots of cases I might
134     have missed.
135    
136     For the next release I'm planning to provide more examples in the
137     documentation and/or samples/ directory, along with bugfixes and
138     enhancements along with some todo items killed from the TODO file.
139    
140     TODO
141     There are still lots of items on the TODO list (see also the TODO file
142     in the distribution of Net::XMPP2).
143    
144 elmex 1.2 Why (yet) another XMPP module?
145 elmex 1.4 The main outstanding feature of this module in comparison to the other
146 elmex 1.2 XMPP (aka Jabber) modules out there is the support for AnyEvent.
147     AnyEvent permits you to use this module together with other I/O event
148     based programs and libraries (ie. Gtk2 or Event).
149    
150     The other modules could often only be integrated in those applications
151 elmex 1.4 or libraries by using threads. I decided to write this module because I
152 elmex 1.2 think CPAN lacks an event based XMPP module. Threads are unfortunately
153     not an alternative in Perl at the moment due the limited threading
154     functionality they provide and the global speed hit. I also think that a
155     simple event based I/O framework might be a bit easier to handle than
156     threads.
157    
158     Another thing was that I didn't like the APIs of the other modules. In
159     Net::XMPP2 I try to provide low level modules for speaking XMPP as
160     defined in RFC 3920 and RFC 3921 (see also Net::XMPP2::Connection and
161     Net::XMPP2::IM::Connection). But I also try to provide a high level API
162 elmex 1.3 for easier usage for instant messaging tasks and clients (eg.
163     Net::XMPP2::Client).
164 elmex 1.2
165     A note about TLS
166     This module also supports TLS, as the specification of XMPP requires an
167     implementation to support TLS.
168    
169 elmex 1.4 Maybe there are still some bugs in the handling of TLS in
170 elmex 1.2 Net::XMPP2::Connection. So keep an eye on TLS with this module. If you
171     encounter any problems it would be very helpful if you could debug them
172     or at least send me a detailed report on how to reproduce the problem.
173    
174     (As I use this module myself I don't expect TLS to be completly broken,
175     but it might break under different circumstances than I have here. Those
176     circumstances might be a different load of data pumped through the TLS
177     connection.)
178    
179 elmex 1.4 I mainly expect problems where available data isn't properly read from
180     the socket or written to it. You might want to take a look at the
181 elmex 1.2 "debug_send" and "debug_recv" events in Net::XMPP2::Connection.
182    
183 elmex 1.4 Supported extensions
184 elmex 1.3 See Net::XMPP2::Ext for a list.
185 elmex 1.2
186 elmex 1.3 EXAMPLES
187 elmex 1.4 Following examples are included in this distribution:
188    
189     samples/simple_example_1
190     This example script just connects to a server and sends a message
191     and also displays incoming messages on stdout.
192    
193     samples/devcl/devcl
194     This is a more advanced 'example'. It requires you to have Gtk2
195     installed. It's mostly used by the author to implement
196     proof-of-concepts. Currently you start the client like this:
197    
198     ../Net-XMPP2/samples/devcl/# perl ./devcl <jid> <password>
199    
200     The client's main window displays a protocol dump and there is
201     currently a service discovery browser implemented.
202    
203     This might be a valuable source if you look for more real-world
204     applications of Net::XMPP2.
205    
206     samples/conference_lister
207     See below.
208    
209     samples/room_lister
210     See below.
211    
212     samples/room_lister_stat
213     These three scripts implements a global room scan.
214     "conference_lister" takes a list of servers (the file is called
215     "servers.xml" which has the same format as the xml file at
216     <http://www.jabber.org/servers.xml>). It then scans all servers for
217     chat room services and lists them into a file "conferences.stor",
218     which is a Storable dump.
219    
220     "room_lister" then reads that file and queries all services for
221     rooms, and then all rooms for their occupants. The output file is
222     "room_data.stor", also a Storable dump, which in turn can be read
223     with "room_lister_stat", which transform the data structures into
224     something human readable.
225    
226     These scripts are a bit hacky and quite complicated, but maybe it's
227     of any value for someone. You might note "EVQ.pm" in samples which
228     is a module that handles request-throttling (You don't want to flood
229     the server and risk getting the admins attention :).
230    
231 elmex 1.5 samples/simple_component
232     This is a (basic) skeleton for a jabber component.
233    
234 elmex 1.4 For others, which the author might forgot or didn't want to list here
235     see the "samples/" directory.
236    
237     More examples will be included in later releases, please feel free to
238     ask the "AUTHOR" if you have any questions about the API. There is also
239     an IRC channel, see "SUPPORT".
240 elmex 1.1
241     AUTHOR
242 elmex 1.3 Robin Redeker, "<elmex at ta-sa.org>", JID: "<elmex at jabber.org>"
243 elmex 1.1
244     BUGS
245 elmex 1.3 Please note that I'm currently (July 2007) the only developer on this
246     project and I'm very busy with my studies in Computer Science in Summer
247 elmex 1.4 2007. If you want to ease my workload or want timely releases, please
248     send me patches instead of bug reports or feature requests. I won't
249     forget the reports or requests if you can't or didn't send patches, but
250 elmex 1.6 I can't gurantee immediate response. But I will of course try to
251     fix/implement them as soon as possible!
252 elmex 1.3
253 elmex 1.4 Also try to be as precise as possible with bug reports, if you can't
254     send a patch, it would be best if you find out which code doesn't work
255     and tell me why.
256 elmex 1.3
257 elmex 1.1 Please report any bugs or feature requests to "bug-net-xmpp2 at
258     rt.cpan.org", or through the web interface at
259     <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-XMPP2>. I will be
260 elmex 1.4 notified and then you'll automatically be notified of progress on your
261 elmex 1.1 bug as I make changes.
262    
263     SUPPORT
264     You can find documentation for this module with the perldoc command.
265    
266     perldoc Net::XMPP2
267    
268     You can also look for information at:
269    
270 elmex 1.3 * IRC: Net::XMPP2 IRC Channel
271     IRC Network: http://freenode.net/
272     Server : chat.freenode.net
273     Channel : #net_xmpp2
274    
275     Feel free to join and ask questions!
276    
277     * Net::XMPP2 Project Site
278     <http://www.ta-sa.org/>
279    
280 elmex 1.1 * AnnoCPAN: Annotated CPAN documentation
281     <http://annocpan.org/dist/Net-XMPP2>
282    
283     * CPAN Ratings
284     <http://cpanratings.perl.org/d/Net-XMPP2>
285    
286     * RT: CPAN's request tracker
287     <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-XMPP2>
288    
289     * Search CPAN
290     <http://search.cpan.org/dist/Net-XMPP2>
291    
292     ACKNOWLEDGEMENTS
293 elmex 1.3 Thanks to the XSF for the development of an open instant messaging
294 elmex 1.4 protocol (even though it uses "XML").
295 elmex 1.3
296     And thanks to all people who had to listen to my desperate curses about
297 elmex 1.4 the brokenness/braindeadness of XMPP. Without you I would've never
298 elmex 1.3 brought this module to a usable state.
299    
300 elmex 1.4 Thanks to:
301    
302     * Carlo von Loesch (aka lynX) <http://www.psyced.org/>
303     For pointing out some typos.
304    
305 elmex 1.1 COPYRIGHT & LICENSE
306     Copyright 2007 Robin Redeker, all rights reserved.
307    
308     This program is free software; you can redistribute it and/or modify it
309     under the same terms as Perl itself.
310