AnyEvent-DAAP-Server
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# }
use 5.005;
use strict 'vars';
use Cwd ();
use File::Find ();
use File::Path ();
use vars qw{$VERSION $MAIN};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
# different versions of modules.
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
$VERSION = '1.00';
# Storage for the pseudo-singleton
$MAIN = undef;
lib/AnyEvent/DAAP/Server/Track.pm view on Meta::CPAN
Abstract method. Should return track's music data immediately.
If $track allows ranged request, the $pos parameter may be supplied. If so, $track should
return data from the position at $pos byte.
=item my $bool = $track->allow_range;
Override this to return true if this track allows ranged request (i.e. skip/pause). Defaults to return 0.
=item $track->write_data($connection, $res, $pos);
Override this method if you want to send data to clients asynchronously.
$connection argument is an L<AnyEvent::DAAP::Server::Connection>.
$connection->handle is an L<AnyEvent::Handle> so call $connection->handle->push_write() this to send data.
$res argument is partially filled L<HTTP::Response>, without $res->content and $res->content_length.
$pos argument is requested start-position of music data or undef.
After writing all data, you should send $connection->handle->push_shutdown().
( run in 0.558 second using v1.01-cache-2.11-cpan-0d8aa00de5b )