ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/Net-XMPP2/lib/Net/XMPP2.pm
Revision: 1.12
Committed: Wed Jul 4 16:29:06 2007 UTC (19 years, 3 months ago) by elmex
Branch: MAIN
Changes since 1.11: +60 -0 lines
Log Message:
further documentation

File Contents

# User Rev Content
1 elmex 1.1 package Net::XMPP2;
2     use warnings;
3     use strict;
4    
5     =head1 NAME
6    
7     Net::XMPP2 - An implementation of the XMPP Protocol
8    
9     =head1 VERSION
10    
11     Version 0.01
12    
13     =cut
14    
15     our $VERSION = '0.01';
16    
17     =head1 SYNOPSIS
18    
19 elmex 1.2 use Net::XMPP2::Connection;
20 elmex 1.1
21 elmex 1.2 or:
22 elmex 1.1
23 elmex 1.2 use Net::XMPP2::IM::Connection;
24 elmex 1.1
25 elmex 1.11 or:
26    
27     use Net::XMPP2::Client;
28    
29 elmex 1.2 =head1 DESCRIPTION
30    
31     This is the head module of the L<Net::XMPP2> XMPP client protocol (as described in
32 elmex 1.4 RFC 3920 and RFC 3921) framework.
33 elmex 1.2
34 elmex 1.4 L<Net::XMPP2::Connection> is a RFC 3920 conformant "XML" stream implementation
35 elmex 1.5 for clients, which handles tcp connect up to the resource binding. And provides
36     low-level access to the XML nodes on the XML stream along with some high
37     level methods to send the predefined XML stanzas.
38 elmex 1.2
39 elmex 1.4 L<Net::XMPP2::IM::Connection> is a more highlevel module, which is derived
40     from L<Net::XMPP2::Connection>. It handles all the instant messaging client
41 elmex 1.5 functionality described in RFC 3921.
42    
43 elmex 1.11 L<Net::XMPP2::Client> is a multi account client class. It manages connections
44     to multiple XMPP accounts and tries to offer a nice highlevel interface
45     to XMPP communication.
46    
47 elmex 1.9 For a list of L<Supportet extensions> see below.
48 elmex 1.2
49     There are also other modules in this distribution, for example:
50 elmex 1.11 L<Net::XMPP2::Util>, L<Net::XMPP2::Writer>, L<Net::XMPP2::Parser> and those I
51 elmex 1.2 forgot :-) Those modules might be helpful and/or required if you want to use
52     this framework for XMPP.
53    
54     See also L<Net::XMPP2::Writer> for a discussion about the brokeness of XML in the XMPP
55     specification.
56    
57 elmex 1.12 =head1 REQUIREMENTS
58    
59     One of the major drawbacks I see for Net::XMPP2 is the long list of required
60     modules to make it work.
61    
62     =over 4
63    
64     =item AnyEvent
65    
66     For the I/O events and timers.
67    
68     =item XML::Writer
69    
70     For writing "XML".
71    
72     =item XML::Parser::Expat
73    
74     For parsing partial "XML" stuff.
75    
76     =item MIME::Base64
77    
78     For SASL authentication
79    
80     =item Authen::SASL
81    
82     For SASL authentication
83    
84     =item Net::LibIDN
85    
86     For stringprep profiles to handle JIDs.
87    
88     =item Net::SSLeay
89    
90     For SSL connections.
91    
92     =item Net::DNS
93    
94     For SRV RR lookups.
95    
96     =back
97    
98     And yes, all these are essential for XMPP communication. Even thought 'instant
99     messaging' and 'presence' is a quite simple problem XMPP somehow was successful
100     at complicating the task enough to keep me busy for a long time. But all that
101     time wasn't only for the technology required to get it started, mostly it
102     was for all the quirks, hacks and badly applied "XML" in the protocol which
103     complicated the matter.
104    
105 elmex 1.11 =head1 RELEASE NOTES
106    
107     Here are some notes to the releases (release of this version is at top):
108    
109     =head2 Version
110    
111     =over 4
112    
113     =item 0.01
114    
115     This release has beta status. The code is already used daily in my client
116     and I keep looking out for bugs. If you find undocumented, missing or faulty
117     code/methods please drop me a mail! See also L<BUGS> below.
118    
119     Potential edges when using this module: under-documented methods, missing
120     functionality and generally bugs bugs and bugs. Even thought this module is in
121     daily usage there are still lots of cases I might have missed.
122    
123     For the next release I'm planning to provide more examples in the documentation
124     or samples/ directory, along with bugfixes and enhancements along with some
125     todo items killed from the TODO file.
126    
127     =back
128    
129     =head2 TODO
130    
131     There are still lots of items on the TODO list (see also the TODO file
132     in the distribution of Net::XMPP2). For further and more detailed todo items
133     look there.
134    
135 elmex 1.2 =head1 Why (yet) another XMPP module?
136    
137     The main outstanding feature of this module in comparsion to the other XMPP
138     (aka Jabber) modules out there is the support for L<AnyEvent>. L<AnyEvent>
139     permits you to use this module together with other I/O event based programs and
140     libraries (ie. L<Gtk2> or L<Event>).
141    
142     The other modules could often only be integrated in those applications or librarys
143 elmex 1.11 by using threads. I decided to write this module because I think CPAN lacks
144 elmex 1.4 an event based XMPP module. Threads are unfortunately not an alternative in Perl
145     at the moment due the limited threading functionality they provide and the global
146     speed hit. I also think that a simple event based I/O framework might be a bit easier
147     to handle than threads.
148 elmex 1.2
149     Another thing was that I didn't like the APIs of the other modules. In L<Net::XMPP2>
150 elmex 1.9 I try to provide low level modules for speaking XMPP as defined in RFC 3920 and RFC 3921
151     (see also L<Net::XMPP2::Connection> and L<Net::XMPP2::IM::Connection>). But I also
152 elmex 1.11 try to provide a high level API for easier usage for instant messaging tasks
153     and clients (eg. L<Net::XMPP2::IM::Client>).
154 elmex 1.2
155     =head1 A note about TLS
156    
157     This module also supports TLS, as the specification of XMPP requires an
158 elmex 1.7 implementation to support TLS.
159 elmex 1.2
160     There are maybe still some bugs in the handling of TLS in L<Net::XMPP2::Connection>.
161 elmex 1.7 So keep an eye on TLS with this module. If you encounter any problems it would be
162     very helpful if you could debug them or at least send me a detailed report on how
163     to reproduce the problem.
164    
165     (As I use this module myself I don't expect TLS to be completly broken, but it
166     might break under different circumstances than I have here. Those
167     circumstances might be a different load of data pumped through the TLS
168     connection.)
169 elmex 1.1
170 elmex 1.2 I mainly expect problems where aviable data isn't properly read from the socket
171     or written to it. You might want to take a look at the C<debug_send> and C<debug_recv>
172     events in L<Net::XMPP2::Connection>.
173 elmex 1.1
174 elmex 1.4 =head1 Supportet extensions
175 elmex 1.3
176 elmex 1.10 See L<Net::XMPP2::Ext> for a list.
177 elmex 1.3
178 elmex 1.1 =head1 AUTHOR
179    
180 elmex 1.11 Robin Redeker, C<< <elmex at ta-sa.org> >>, JID: C<< <elmex at jabber.org> >>
181 elmex 1.1
182     =head1 BUGS
183    
184 elmex 1.12 Please note that I'm currently (July 2007) the only developer on this project
185     and I'm very busy with my studies in Computer Science in Summer 2007. If you
186     want to ease my workload or want timely releases please send me patches instead
187     only bug reports or feature requests. I won't forget the reports or requests if
188     you can't or didn't send patches but it can take a long time until I get enough
189     time to fix/implement them.
190    
191     Also try to be as precise as possible with bugreports and best, if you can't
192     send a patch, would be if you find out which code doesn't work and tell me why.
193    
194 elmex 1.1 Please report any bugs or feature requests to
195     C<bug-net-xmpp2 at rt.cpan.org>, or through the web interface at
196     L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-XMPP2>.
197     I will be notified, and then you'll automatically be notified of progress on
198     your bug as I make changes.
199    
200     =head1 SUPPORT
201    
202     You can find documentation for this module with the perldoc command.
203    
204     perldoc Net::XMPP2
205    
206     You can also look for information at:
207    
208     =over 4
209    
210     =item * AnnoCPAN: Annotated CPAN documentation
211    
212     L<http://annocpan.org/dist/Net-XMPP2>
213    
214     =item * CPAN Ratings
215    
216     L<http://cpanratings.perl.org/d/Net-XMPP2>
217    
218     =item * RT: CPAN's request tracker
219    
220     L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-XMPP2>
221    
222     =item * Search CPAN
223    
224     L<http://search.cpan.org/dist/Net-XMPP2>
225    
226     =back
227    
228     =head1 ACKNOWLEDGEMENTS
229    
230 elmex 1.12 Thanks to the XSF for the effords of messing around with the broken Jabber protocol.
231    
232 elmex 1.1 =head1 COPYRIGHT & LICENSE
233    
234     Copyright 2007 Robin Redeker, all rights reserved.
235    
236     This program is free software; you can redistribute it and/or modify it
237     under the same terms as Perl itself.
238    
239     =cut
240    
241     1; # End of Net::XMPP2