gausby / tortoise

A MQTT Client written in Elixir
Apache License 2.0
314 stars 54 forks source link

Make keep alive ping response an event #58

Closed gausby closed 6 years ago

gausby commented 6 years ago

Dispatch ping response times via the Tortoise.Events pubsub registry.

When applied this will change the way we register processes in the registry. Previously a :connection would be stored under {client_id, type} where type was the message type like :connection. Now we store type and the value will be the client_id. This will allow us to register and unregister multiple client_ids.

Lastly it has been made possible to match every client id on a node by specifying :_ as the client id when registering for an event type.

coveralls commented 6 years ago

Pull Request Test Coverage Report for Build 405


Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/tortoise/connection.ex 4 5 80.0%
<!-- Total: 8 9 88.89% -->
Files with Coverage Reduction New Missed Lines %
lib/tortoise/connection/receiver.ex 1 84.38%
lib/tortoise/connection.ex 1 80.47%
<!-- Total: 2 -->
Totals Coverage Status
Change from base Build 397: -0.1%
Covered Lines: 521
Relevant Lines: 604

💛 - Coveralls