Net::Async::ControlChannel::Client - IO::Async support for Protocol::ControlChannel.
Version 0.005
Provides the client half for a control channel connection.
Instantiate a new client object.
Expects the following named parameters:
loop - the IO::Async::Loop we will attach to
host - which host we're connecting to
port - the port to connect to
Returns the instance.
The IO::Async::Loop object. Used internally.
The Protocol::ControlChannel instance. Used internally.
A Future which resolves when the connection is established.
Connects to the target host, returning a Future which will resolve once the connection is ready (this Future is also available via "connection").
Called internally when we have data from the server.
Dispatches the given key, value pair to the remote.
Expects two parameters:
$k - a Perl string representing the key we're sending over. Typically this will be 'some.dotted.string'.
$v - the value to send over, either a reference or a byte string.
Unicode characters are allowed for the key, but if you want to send non-ASCII text data in the content, it should be encoded explicitly:
$cc->dispatch("utf₈.is.fine" => Encode::encode('UTF-8' => "ƃuıpoɔuǝ spǝǝu"));
add_handler_for_event, clear_event_handlers, event_handlers, invoke_event, subscribe_to_event, unsubscribe_from_event
Tom Molesworth <cpan@entitymodel.com>
Copyright Tom Molesworth 2012-2014. Licensed under the same terms as Perl itself.
To install Net::Async::ControlChannel, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Async::ControlChannel
CPAN shell
perl -MCPAN -e shell install Net::Async::ControlChannel
For more information on module installation, please visit the detailed CPAN module installation guide.