Lines
n/a
0 / 0
Functions and Methods
n/a
0 / 0
Classes and Traits
n/a
0 / 0
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | <?php | |
| 2 | ||
| 3 | declare(strict_types=1); | |
| 4 | ||
| 5 | namespace Stewart\Contracts\Mqtt; | |
| 6 | ||
| 7 | use Stewart\Contracts\EventStream; | |
| 8 | use Stewart\Contracts\Exception\MqttException; | |
| 9 | use Stewart\Contracts\Exception\SelectorException; | |
| 10 | ||
| 11 | interface Mqtt | |
| 12 | { | |
| 13 | /** | |
| 14 | * @param string|array<array-key, mixed> $payload | |
| 15 | * @throws MqttException | |
| 16 | */ | |
| 17 | public function publish(string $topic, string|array $payload, MqttQos $qos = MqttQos::AtMostOnce, bool $retain = false): void; | |
| 18 | ||
| 19 | /** | |
| 20 | * @return EventStream<MqttMessage> | |
| 21 | * @throws SelectorException|MqttException | |
| 22 | */ | |
| 23 | public function watchMessages(string $topicFilter): EventStream; | |
| 24 | } |