POE::Component::Client::MPD::Connection - module handling the tcp connection with mpd 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.

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: The hostname of the mpd server. The port of the mpd server. 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! :-) 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. 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" Jerome Quelin, "<jquelin at cpan.org>" Copyright (c) 2007 Jerome Quelin, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.