ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/Net-XMPP2/lib/Net/XMPP2.pm
Revision: 1.17
Committed: Thu Jul 5 19:27:35 2007 UTC (19 years, 3 months ago) by elmex
Branch: MAIN
Changes since 1.16: +13 -3 lines
Log Message:
fixed some typos and such

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.17 For a list of L</Supported 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.15 If you have any questions or seek for help look below under L</SUPPORT>.
58    
59 elmex 1.12 =head1 REQUIREMENTS
60    
61     One of the major drawbacks I see for Net::XMPP2 is the long list of required
62     modules to make it work.
63    
64     =over 4
65    
66 elmex 1.15 =item L<AnyEvent>
67 elmex 1.12
68     For the I/O events and timers.
69    
70 elmex 1.15 =item L<XML::Writer>
71 elmex 1.12
72     For writing "XML".
73    
74 elmex 1.15 =item L<XML::Parser::Expat>
75 elmex 1.12
76     For parsing partial "XML" stuff.
77    
78 elmex 1.15 =item L<MIME::Base64>
79 elmex 1.12
80     For SASL authentication
81    
82 elmex 1.15 =item L<Authen::SASL>
83 elmex 1.12
84     For SASL authentication
85    
86 elmex 1.15 =item L<Net::LibIDN>
87 elmex 1.12
88     For stringprep profiles to handle JIDs.
89    
90 elmex 1.15 =item L<Net::SSLeay>
91 elmex 1.12
92     For SSL connections.
93    
94 elmex 1.15 =item L<Net::DNS>
95 elmex 1.12
96     For SRV RR lookups.
97    
98     =back
99    
100     And yes, all these are essential for XMPP communication. Even thought 'instant
101     messaging' and 'presence' is a quite simple problem XMPP somehow was successful
102     at complicating the task enough to keep me busy for a long time. But all that
103     time wasn't only for the technology required to get it started, mostly it
104     was for all the quirks, hacks and badly applied "XML" in the protocol which
105     complicated the matter.
106    
107 elmex 1.11 =head1 RELEASE NOTES
108    
109     Here are some notes to the releases (release of this version is at top):
110    
111     =head2 Version
112    
113     =over 4
114    
115 elmex 1.15 =item * 0.01
116 elmex 1.11
117     This release has beta status. The code is already used daily in my client
118     and I keep looking out for bugs. If you find undocumented, missing or faulty
119 elmex 1.15 code/methods please drop me a mail! See also L</BUGS> below.
120 elmex 1.11
121 elmex 1.14 Potential edges when using this module: sparely documented methods, missing
122 elmex 1.11 functionality and generally bugs bugs and bugs. Even thought this module is in
123     daily usage there are still lots of cases I might have missed.
124    
125     For the next release I'm planning to provide more examples in the documentation
126 elmex 1.14 and/or samples/ directory, along with bugfixes and enhancements along with some
127 elmex 1.11 todo items killed from the TODO file.
128    
129     =back
130    
131     =head2 TODO
132    
133     There are still lots of items on the TODO list (see also the TODO file
134 elmex 1.14 in the distribution of Net::XMPP2).
135 elmex 1.11
136 elmex 1.2 =head1 Why (yet) another XMPP module?
137    
138 elmex 1.17 The main outstanding feature of this module in comparison to the other XMPP
139 elmex 1.2 (aka Jabber) modules out there is the support for L<AnyEvent>. L<AnyEvent>
140     permits you to use this module together with other I/O event based programs and
141     libraries (ie. L<Gtk2> or L<Event>).
142    
143     The other modules could often only be integrated in those applications or librarys
144 elmex 1.11 by using threads. I decided to write this module because I think CPAN lacks
145 elmex 1.4 an event based XMPP module. Threads are unfortunately not an alternative in Perl
146     at the moment due the limited threading functionality they provide and the global
147     speed hit. I also think that a simple event based I/O framework might be a bit easier
148     to handle than threads.
149 elmex 1.2
150     Another thing was that I didn't like the APIs of the other modules. In L<Net::XMPP2>
151 elmex 1.9 I try to provide low level modules for speaking XMPP as defined in RFC 3920 and RFC 3921
152     (see also L<Net::XMPP2::Connection> and L<Net::XMPP2::IM::Connection>). But I also
153 elmex 1.11 try to provide a high level API for easier usage for instant messaging tasks
154 elmex 1.15 and clients (eg. L<Net::XMPP2::Client>).
155 elmex 1.2
156     =head1 A note about TLS
157    
158     This module also supports TLS, as the specification of XMPP requires an
159 elmex 1.7 implementation to support TLS.
160 elmex 1.2
161     There are maybe still some bugs in the handling of TLS in L<Net::XMPP2::Connection>.
162 elmex 1.7 So keep an eye on TLS with this module. If you encounter any problems it would be
163     very helpful if you could debug them or at least send me a detailed report on how
164     to reproduce the problem.
165    
166     (As I use this module myself I don't expect TLS to be completly broken, but it
167     might break under different circumstances than I have here. Those
168     circumstances might be a different load of data pumped through the TLS
169     connection.)
170 elmex 1.1
171 elmex 1.2 I mainly expect problems where aviable data isn't properly read from the socket
172     or written to it. You might want to take a look at the C<debug_send> and C<debug_recv>
173     events in L<Net::XMPP2::Connection>.
174 elmex 1.1
175 elmex 1.17 =head1 Supported extensions
176 elmex 1.3
177 elmex 1.10 See L<Net::XMPP2::Ext> for a list.
178 elmex 1.3
179 elmex 1.16 =head1 EXAMPLES
180    
181     See C<samples/test_client> for a first pointer. More examples will be included
182     in later releases, please feel free to ask the L</AUTHOR> if you have any questions
183     about the API. There is also an IRC channel, see L</SUPPORT>.
184    
185 elmex 1.1 =head1 AUTHOR
186    
187 elmex 1.11 Robin Redeker, C<< <elmex at ta-sa.org> >>, JID: C<< <elmex at jabber.org> >>
188 elmex 1.1
189     =head1 BUGS
190    
191 elmex 1.12 Please note that I'm currently (July 2007) the only developer on this project
192     and I'm very busy with my studies in Computer Science in Summer 2007. If you
193     want to ease my workload or want timely releases please send me patches instead
194     only bug reports or feature requests. I won't forget the reports or requests if
195     you can't or didn't send patches but it can take a long time until I get enough
196     time to fix/implement them.
197    
198     Also try to be as precise as possible with bugreports and best, if you can't
199     send a patch, would be if you find out which code doesn't work and tell me why.
200    
201 elmex 1.1 Please report any bugs or feature requests to
202     C<bug-net-xmpp2 at rt.cpan.org>, or through the web interface at
203     L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-XMPP2>.
204     I will be notified, and then you'll automatically be notified of progress on
205     your bug as I make changes.
206    
207     =head1 SUPPORT
208    
209     You can find documentation for this module with the perldoc command.
210    
211     perldoc Net::XMPP2
212    
213     You can also look for information at:
214    
215     =over 4
216    
217 elmex 1.15 =item * IRC: Net::XMPP2 IRC Channel
218    
219     IRC Network: http://freenode.net/
220     Server : chat.freenode.net
221     Channel : #net_xmpp2
222    
223 elmex 1.16 Feel free to join and ask questions!
224    
225 elmex 1.15 =item * Net::XMPP2 Project Site
226    
227     L<http://www.ta-sa.org/>
228    
229 elmex 1.1 =item * AnnoCPAN: Annotated CPAN documentation
230    
231     L<http://annocpan.org/dist/Net-XMPP2>
232    
233     =item * CPAN Ratings
234    
235     L<http://cpanratings.perl.org/d/Net-XMPP2>
236    
237     =item * RT: CPAN's request tracker
238    
239     L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-XMPP2>
240    
241     =item * Search CPAN
242    
243     L<http://search.cpan.org/dist/Net-XMPP2>
244    
245     =back
246    
247     =head1 ACKNOWLEDGEMENTS
248    
249 elmex 1.15 Thanks to the XSF for the development of an open instant messaging protocol (even thought it uses "XML").
250 elmex 1.13
251     And thanks to all people who had to listen to my desperate curses about the
252     brokeness/braindeadness of XMPP, without you I would've never brought this
253     module to a usable state.
254 elmex 1.12
255 elmex 1.17 Thanks to:
256    
257     =over 4
258    
259     =item lynx
260    
261     For pointing out some typos.
262    
263     =back
264    
265 elmex 1.1 =head1 COPYRIGHT & LICENSE
266    
267     Copyright 2007 Robin Redeker, all rights reserved.
268    
269     This program is free software; you can redistribute it and/or modify it
270     under the same terms as Perl itself.
271    
272     =cut
273    
274     1; # End of Net::XMPP2