NAME
AnyEvent::Sereal - Sereal stream serializer/deserializer for AnyEvent
SYNOPSIS
use AnyEvent::Sereal;
use AnyEvent::Handle;
my $hdl = AnyEvent::Handle->new(
# settings...
);
$hdl->push_write(sereal => [ 1, 2, 3 ]);
$hdl->push_read(sereal => sub {
my($hdl, $data) = @_;
# $data is [ 1, 2, 3 ]
});
# Can pass L<Sereal::Encoder> options to C<push_write>
$hdl->push_write(sereal => 'a' x 1_000, { snappy => 1 });
# And pass L<Sereal::Decoder> options to C<push_read>
$hdl->push_read(sereal => { refuse_snappy => 1 }, sub { ... });
DESCRIPTION
AnyEvent::Sereal is Sereal serializer/deserializer for AnyEvent.
The maximum size of serialized (and possibly compressed) data is specified by the variable $AnyEvent::Sereal::SERIALIZED_MAX_SIZE
. It defaults to 1_000_000 bytes. In case received data seems to contain more than this number of bytes, an error Errno::E2BIG
is given to the error handler.
SEE ALSO
AnyEvent::Handle and storable filter.
Sereal::Encoder and Sereal::Decoder.
AUTHOR
Maxime Soulé, <btik-cpan@scoubidou.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Ijenko.
http://www.ijenko.com
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.