The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
# outgoing connection to another server in our domain
package DJabberd::Connection::ClusterOut;
use strict;
use base 'DJabberd::Connection::ServerOut';
use Carp qw(croak);

sub on_connected {
    my $self = shift;
    # TODO:
    #   start binary protocol

}

sub event_read {
    # ... read binary protocol
}

1;