Skip to content

Commit

Permalink
Merge branch 'allow-setting-secureContext'
Browse files Browse the repository at this point in the history
  • Loading branch information
cboden committed Jan 2, 2017
2 parents 67acb1f + a75de4a commit e42f10a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}
, "require": {
"php": ">=5.4"
, "react/socket-client": "^0.4.3|^0.5"
, "react/socket-client": "^0.5"
, "ratchet/rfc6455": "^0.2.1"
}
, "suggest": {
Expand Down
4 changes: 2 additions & 2 deletions src/Connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ class Connector {
protected $_secureConnector;
protected $_negotiator;

public function __construct(LoopInterface $loop, Resolver $resolver = null) {
public function __construct(LoopInterface $loop, Resolver $resolver = null, array $secureContext = []) {
if (null === $resolver) {
$factory = new DnsFactory();
$resolver = $factory->create('8.8.8.8', $loop);
}

$this->_loop = $loop;
$this->_connector = new SocketConnector($loop, $resolver);
$this->_secureConnector = new SecureConnector($this->_connector, $loop);
$this->_secureConnector = new SecureConnector($this->_connector, $loop, $secureContext);
$this->_negotiator = new ClientNegotiator;
}

Expand Down

0 comments on commit e42f10a

Please sign in to comment.