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
For all related information (bug reporting, mailing-list, pointers to MPD and POE, etc.), refer to POE::Component::Client::MPD
's pod, section SEE ALSO
AUTHOR
Jerome Quelin, <jquelin at cpan.org>
COPYRIGHT & LICENSE
Copyright 2007 Jerome Quelin, all rights reserved.
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.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA