Possibility to set persistent connection flag when creating socket - #57
Conversation
| * @throws ConnectionException | ||
| */ | ||
| public function __construct($brokerUri, $connectionTimeout = 1, array $context = []) | ||
| public function __construct($brokerUri, $connectionTimeout = 1, array $context = [], $persistentConnection = false) |
There was a problem hiding this comment.
instead of adding even more __construct() args I would prefer a dedicated setter.
makes client code more readable.
There was a problem hiding this comment.
Maybe we should add a setter for stream_socket_client - flags?
There was a problem hiding this comment.
I see no more flags which would be usefull.
the benefit of having dedicated setters is, that the Connection class api hides the underlying implementation details.
There was a problem hiding this comment.
Ok, constructor param replaced with setter. Does it look like you thought?:)
|
LGTM thx 👍 |
|
I wanted to squash commits to one, but nevermind:) |
|
Sorry too fast and maybe a little bit too early this day for me ;) |
|
Anyway now it's available in https://github.com/stomp-php/stomp-php/releases/tag/4.1.3 thanks! |
Added posibility to create socket with STREAM_CLIENT_PERSISTENT.
Can you point me what (unit) tests to create?