DJabberd
view release on metacpan or search on metacpan
- Updated DJabberd::Component::Example which uses the correct
API. The previous example didn't actually work anymore.
- Add POD for DJabberd::Agent, DJabberd::Component and a bunch of
other related modules.
- Make bots automatically accept roster subscription requests.
0.83 2007-05-08
- the "yes, this project is still alive" release
- packaging fixes, tree clean, dist now managed by ShipIt, for more
regular releases
- ClientPort, ServerPort, AdminPort can include IPs to bind to, not
just port numbers.
- better pidfile support
- optional expansion of environment in config files, using
lib/DJabberd/Connection.pm view on Meta::CPAN
return;
}
$bref = \$data;
} else {
# non-ssl mode:
$bref = $self->read(20_000);
}
return $self->close unless defined $bref;
# clients send whitespace between stanzas as keep-alives. let's just ignore those,
# not going through the bother to checkout a parser and all.
return if ! $self->{parser} && $$bref !~ /\S/;
Carp::confess if ($self->{closed});
if (XMLDEBUG) {
my $time = Time::HiRes::time;
$LOGMAP{$self}->print("$time\t< $$bref\n");
}
lib/DJabberd/SAXHandler.pm view on Meta::CPAN
sub characters {
my ($self, $data) = @_;
if ($self->{capture_depth}) {
push @{$self->{events}}, [EVT_CHARS, $data];
}
# TODO: disconnect client if character data between stanzas? as
# long as it's not whitespace, because that's permitted as a
# keep-alive.
}
sub end_element {
my ($self, $data) = @_;
if ($data->{NamespaceURI} eq "http://etherx.jabber.org/streams" &&
$data->{LocalName} eq "stream") {
$self->{ds_conn}->end_stream if $self->{ds_conn};
return;
t/write-error-and-close.t view on Meta::CPAN
# add ourself to our roster, so when we die, the server will send
# us our own disconnect info, causing infinite recursion if server
# isn't careful.
$pa->subscribe_successfully($pa);
# this will switch our writer in error-and-close mode.
$pa->send_xml("<iq type='set' id='foo'><query xmlns='djabberd:test'>write error</query></iq>");
# this could (cause the server to blow up)
ok(!$pa->recv_xml(1.5), "didn't get an answer");
# PB to self (see if server still alive)
$pb->send_xml("<message type='chat' to='$pb'>Hello myself!</message>");
like($pb->recv_xml, qr/Hello myself/, "pb got own message");
});
( run in 0.515 second using v1.01-cache-2.11-cpan-39bf76dae61 )