ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/Net-XMPP2/lib/Net/XMPP2.pm
Revision: 1.7
Committed: Thu Apr 19 19:56:28 2007 UTC (19 years, 5 months ago) by elmex
Branch: MAIN
Changes since 1.6: +9 -13 lines
Log Message:
removed requirement for a patched version of Net::SSLeay, as it doesn't
seem to be released anytime soon :-(
========== MARKER NEW Net::SSLeay SSL_read_nb SSL_write_nb removed ========

File Contents

# User Rev Content
1 elmex 1.1 package Net::XMPP2;
2     use warnings;
3     use strict;
4    
5 elmex 1.3 our %EXTENSION_ENABLED;
6    
7 elmex 1.1 =head1 NAME
8    
9     Net::XMPP2 - An implementation of the XMPP Protocol
10    
11     =head1 VERSION
12    
13     Version 0.01
14    
15     =cut
16    
17     our $VERSION = '0.01';
18    
19     =head1 SYNOPSIS
20    
21 elmex 1.2 use Net::XMPP2::Connection;
22 elmex 1.1
23 elmex 1.2 or:
24 elmex 1.1
25 elmex 1.2 use Net::XMPP2::IM::Connection;
26 elmex 1.1
27 elmex 1.2 =head1 DESCRIPTION
28    
29     This is the head module of the L<Net::XMPP2> XMPP client protocol (as described in
30 elmex 1.4 RFC 3920 and RFC 3921) framework.
31 elmex 1.2
32 elmex 1.4 L<Net::XMPP2::Connection> is a RFC 3920 conformant "XML" stream implementation
33 elmex 1.5 for clients, which handles tcp connect up to the resource binding. And provides
34     low-level access to the XML nodes on the XML stream along with some high
35     level methods to send the predefined XML stanzas.
36 elmex 1.2
37 elmex 1.4 L<Net::XMPP2::IM::Connection> is a more highlevel module, which is derived
38     from L<Net::XMPP2::Connection>. It handles all the instant messaging client
39 elmex 1.5 functionality described in RFC 3921.
40    
41     Some extensions for XMPP are also implemented and can be activated as described
42     below in L<Supportet extensions>.
43 elmex 1.2
44     There are also other modules in this distribution, for example:
45     L<Net::XMPP2::Util>, L<Net::XMPP2::Writer>, L<Net::XMPP2::Parser> and those i
46     forgot :-) Those modules might be helpful and/or required if you want to use
47     this framework for XMPP.
48    
49     See also L<Net::XMPP2::Writer> for a discussion about the brokeness of XML in the XMPP
50     specification.
51    
52     =head1 Why (yet) another XMPP module?
53    
54     The main outstanding feature of this module in comparsion to the other XMPP
55     (aka Jabber) modules out there is the support for L<AnyEvent>. L<AnyEvent>
56     permits you to use this module together with other I/O event based programs and
57     libraries (ie. L<Gtk2> or L<Event>).
58    
59     The other modules could often only be integrated in those applications or librarys
60 elmex 1.4 by using threads. I decided to write this module because i think CPAN lacks
61     an event based XMPP module. Threads are unfortunately not an alternative in Perl
62     at the moment due the limited threading functionality they provide and the global
63     speed hit. I also think that a simple event based I/O framework might be a bit easier
64     to handle than threads.
65 elmex 1.2
66     Another thing was that I didn't like the APIs of the other modules. In L<Net::XMPP2>
67 elmex 1.4 i try to provide low level modules for speaking XMPP as defined in RFC 3920 and RFC 3921
68     (see also L<Net::XMPP2::Connection> and L<Net::XMPP2::IM::Connection>). But i also
69 elmex 1.5 try to provide a high level API.
70 elmex 1.2
71 elmex 1.4 I also try to have all additional features and functionality as optional as possible
72     to give the client writers enough freedom.
73 elmex 1.2
74     =head1 A note about TLS
75    
76     This module also supports TLS, as the specification of XMPP requires an
77 elmex 1.7 implementation to support TLS.
78 elmex 1.2
79     There are maybe still some bugs in the handling of TLS in L<Net::XMPP2::Connection>.
80 elmex 1.7 So keep an eye on TLS with this module. If you encounter any problems it would be
81     very helpful if you could debug them or at least send me a detailed report on how
82     to reproduce the problem.
83    
84     (As I use this module myself I don't expect TLS to be completly broken, but it
85     might break under different circumstances than I have here. Those
86     circumstances might be a different load of data pumped through the TLS
87     connection.)
88 elmex 1.1
89 elmex 1.2 I mainly expect problems where aviable data isn't properly read from the socket
90     or written to it. You might want to take a look at the C<debug_send> and C<debug_recv>
91     events in L<Net::XMPP2::Connection>.
92 elmex 1.1
93 elmex 1.4 =head1 Supportet extensions
94 elmex 1.3
95     You can extend the functionality of this modules either by giving C<use Net::XMPP2>
96     an argument like this:
97    
98     use Net::XMPP2 qw/xep-0086/;
99    
100 elmex 1.6 There are other extensions that don't change the behaviour of the client
101     to the outside, those are implemented silently. They are listed below the
102     list of supported XMPP extensions.
103    
104     =head2 List of supported extensions
105    
106 elmex 1.3 This is the list of supported XMPP extensions:
107    
108     =over 4
109    
110     =item XEP-0086 - Error Condition Mappings
111    
112     "A mapping to enable legacy entities to correctly handle errors from XMPP-aware entities."
113    
114     This extension will enable sending of the old error codes when generating a stanza
115     error with for example: L<Net::XMPP2::Writer::write_error_tag>
116    
117     =back
118    
119 elmex 1.6 =head2 List of silently supported extensions
120    
121     This is the list of silently supported extensions which don'tt
122     change the behaviour of the modules.
123    
124     =over 4
125    
126     =back
127    
128 elmex 1.3 =cut
129    
130     sub import {
131     my ($mod, @exts) = @_;
132     for (@exts) {
133     if (/^xep-(\d+)$/i) {
134     $EXTENSION_ENABLED{''. (1*$1)} = 1;
135     }
136     }
137     }
138    
139 elmex 1.1 =head1 AUTHOR
140    
141     Robin Redeker, C<< <elmex at ta-sa.org> >>
142    
143     =head1 BUGS
144    
145     Please report any bugs or feature requests to
146     C<bug-net-xmpp2 at rt.cpan.org>, or through the web interface at
147     L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-XMPP2>.
148     I will be notified, and then you'll automatically be notified of progress on
149     your bug as I make changes.
150    
151     =head1 SUPPORT
152    
153     You can find documentation for this module with the perldoc command.
154    
155     perldoc Net::XMPP2
156    
157     You can also look for information at:
158    
159     =over 4
160    
161     =item * AnnoCPAN: Annotated CPAN documentation
162    
163     L<http://annocpan.org/dist/Net-XMPP2>
164    
165     =item * CPAN Ratings
166    
167     L<http://cpanratings.perl.org/d/Net-XMPP2>
168    
169     =item * RT: CPAN's request tracker
170    
171     L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-XMPP2>
172    
173     =item * Search CPAN
174    
175     L<http://search.cpan.org/dist/Net-XMPP2>
176    
177     =back
178    
179     =head1 ACKNOWLEDGEMENTS
180    
181     =head1 COPYRIGHT & LICENSE
182    
183     Copyright 2007 Robin Redeker, all rights reserved.
184    
185     This program is free software; you can redistribute it and/or modify it
186     under the same terms as Perl itself.
187    
188     =cut
189    
190     1; # End of Net::XMPP2