MP3-Daemon
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
my %opt = @_;
my $path = $opt{socket_path} || die("socket_path => REQUIRED!");
my $self = {
player => undef, # instance of Audio:Play:MPG123
server => undef, # instance of IO::Socket::UNIX
client => *STDOUT, # nice for debugging
socket_path => $path,
idle => undef, # coderef to execute while idle
at_exit => [ ] # array of coderefs to execute when done
};
bless ($self => $class);
# clean-up handlers
foreach (@{$self->{at_exit}}) { $self->atExit($_); }
# server socket
$self->{server} = IO::Socket::UNIX->new (
Type => SOCK_STREAM,
Local => $self->{socket_path},
Listen => SOMAXCONN,
) or die($!);
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.848 second using v1.00-cache-2.02-grep-82fe00e-cpan-a086c87fca4 )