NAME

POE::Component::Client::MPD::Connection - module handling the tcp connection with mpd

DESCRIPTION

This module will spawn a poe session responsible for low-level communication with mpd. It is written as a pococ-tcp, which is taking care of everything needed.

Note that you're not supposed to use this class directly: it's one of the helper class for POCOCM.

PUBLIC PACKAGE METHODS

spawn( \%params )

This method will create a POE::Component::TCP session responsible for low-level communication with mpd.

It will return the poe id of the session newly created.

You should provide some arguments as a hash reference, where the hash keys are:

  • host

    The hostname of the mpd server.

  • port

    The port of the mpd server.

  • id

    The POE session id of the peer to dialog with.

Those args are not supposed to be empty - ie, there's no defaut, and you will get an error if you don't follow this requirement! :-)

PROTECTED EVENTS ACCEPTED

The following events are accepted from outside this class - but of course restricted to POCOCM.

disconnect()

Request the pococm-connection to be shutdown. No argument.

send( $request )

Request pococm-conn to send the $request over the wires. Note that this request is a pococm-request object, and that the ->_commands should not be newline terminated.

SEE ALSO

You can find more information on the mpd project on its homepage at http://www.musicpd.org, or its wiki http://mpd.wikia.com.

Regarding this Perl module, you can report bugs on CPAN via http://rt.cpan.org/Public/Bug/Report.html?Queue=Audio-MPD.

POE::Component::Client::MPD development takes place on <audio-mpd@googlegroups.com>: feel free to join us. (use http://groups.google.com/group/audio-mpd to sign in). Our subversion repository is located at https://svn.musicpd.org.

AUTHOR

Jerome Quelin <jquelin@cpan.org>

COPYRIGHT AND LICENSE

Copyright (c) 2007 Jerome Quelin <jquelin@cpan.org>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.