AnyEvent-MQTT
view release on metacpan or search on metacpan
the value of which must either be an L<AnyEvent::Handle> or will be
passed to an L<AnyEvent::Handle> constructor as the C<fh> argument.
The L<push_read()> method is called on the L<AnyEvent::Handle> with a
callback that will publish each chunk read to the topic.
The parameter hash may also keys for:
qos
to set the QoS level for published messages (default
MQTT_QOS_AT_MOST_ONCE),
handle_args
a reference to a list to pass as arguments to the
L<AnyEvent::Handle> constructor in the final case above (defaults to
an empty list reference), or
push_read_args
a reference to a list to pass as the arguments to the
L<AnyEvent::Handle#push_read> method (defaults to ['line'] to read,
and subsequently publish, a line at a time.
Returns a 16-bit number to use as the next message id in a message
requiring an acknowledgement.
This method subscribes to the given topic. The parameter hash may
contain values for the following keys:
topic
for the topic to subscribe to (this is required),
callback
for the callback to call with messages (this is required),
qos
QoS level to use (default is MQTT_QOS_AT_MOST_ONCE),
cv
L<AnyEvent> condvar to use to signal the subscription is complete.
The received value will be the negotiated QoS level.
This method returns the value of the cv parameter if it was supplied or
an AnyEvent condvar created for this purpose.
This method unsubscribes to the given topic. The parameter hash may
contain values for the following keys:
topic
for the topic to unsubscribe from (this is required),
callback
for the callback to call with messages (this is optional and currently
not supported - all callbacks are unsubscribed),
cv
L<AnyEvent> condvar to use to signal the unsubscription is complete.
This method returns the value of the cv parameter if it was supplied or
an AnyEvent condvar created for this purpose.
This method starts the connection to the server. It will be called
lazily when required publish or subscribe so generally is should not be
necessary to call it directly.
This method is used to register an AnyEvent::Handle read type method to
read MQTT messages.
POD ERRORS
Hey! The above document had some coding errors, which are explained
below:
Around line 39:
Unknown directive: =method
Around line 123:
Unknown directive: =method
Around line 128:
Unknown directive: =method
Around line 174:
Unknown directive: =method
Around line 179:
Unknown directive: =method
Around line 208:
Unknown directive: =method
Around line 233:
Unknown directive: =method
Around line 239:
Unknown directive: =method
( run in 0.956 second using v1.01-cache-2.11-cpan-75ffa21a3d4 )