Skip to content

Commit 67e90af

Browse files
committed
Documentation for using SecureConnector WRT default context
The SecureConnector assumes a unique context resource for each stream resource. Failing to allocate one during stream creation may lead to some hard to trace race conditions. See #73 for possible issues.
1 parent a36c401 commit 67e90af

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ $secureConnector->create('www.google.com', 443)->then(function (React\Stream\Str
6767
$loop->run();
6868
```
6969

70+
> Advanced usage: Internally, the `SecureConnector` has to set the required
71+
*context options* on the underlying stream resource.
72+
It should therefor be used with a `Connector` somewhere in the connector
73+
stack so that it can allocate an empty *context* resource for each stream
74+
resource.
75+
Failing to do so may result in some hard to trace race conditions, because all
76+
stream resources will use a single, shared *default context* resource otherwise.
77+
7078
### Unix domain sockets
7179

7280
Similarly, the `UnixConnector` class can be used to connect to Unix domain socket (UDS)

0 commit comments

Comments
 (0)