Skip to content

Commit 33099e5

Browse files
authored
Added possibility to extract the raw socket to loop externally (#9)
When multiplexing between different streams there is the need to use stream_select() on the raw sockets, and then run for a single time into the main loop of the library. This change allows an extending class to obtain the raw socket.
1 parent 8d8e24e commit 33099e5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/MQTTClient.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ class MQTTClient implements ClientContract
5757
/** @var string|null */
5858
private $caFile;
5959

60-
/** @var resource|null */
61-
private $socket;
62-
6360
/** @var float */
6461
private $lastPingAt;
6562

@@ -75,6 +72,9 @@ class MQTTClient implements ClientContract
7572
/** @var bool */
7673
private $interrupted = false;
7774

75+
/** @var resource|null */
76+
protected $socket;
77+
7878
/**
7979
* Constructs a new MQTT client which subsequently supports publishing and subscribing.
8080
*

0 commit comments

Comments
 (0)