Module Version: 0.004
Net::Async::ControlChannel::Client - IO::Async support for Protocol::ControlChannel.
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.
The Protocol::ControlChannel instance.
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"));
Tom Molesworth <email@example.com>
Copyright Tom Molesworth 2012-2013. Licensed under the same terms as Perl itself.