-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify usage by supporting new Socket API without nullable loop
- Loading branch information
Showing
11 changed files
with
44 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,7 +77,7 @@ plaintext HTTP request to google.com through a remote SSH server: | |
```php | ||
$proxy = new Clue\React\SshProxy\SshProcessConnector('[email protected]'); | ||
|
||
$connector = new React\Socket\Connector(null, array( | ||
$connector = new React\Socket\Connector(array( | ||
'tcp' => $proxy, | ||
'dns' => false | ||
)); | ||
|
@@ -287,7 +287,7 @@ $proxy = new Clue\React\SshProxy\SshProcessConnector('[email protected]'); | |
// or | ||
$proxy = new Clue\React\SshProxy\SshSocksConnector('[email protected]'); | ||
|
||
$connector = new React\Socket\Connector(null, array( | ||
$connector = new React\Socket\Connector(array( | ||
'tcp' => $proxy, | ||
'dns' => false | ||
)); | ||
|
@@ -318,7 +318,7 @@ low-level [`SecureConnector`](https://github.com/reactphp/socket#secureconnector | |
```php | ||
$proxy = new Clue\React\SshProxy\SshSocksConnector('[email protected]'); | ||
|
||
$connector = new React\Socket\Connector(null, array( | ||
$connector = new React\Socket\Connector(array( | ||
'tcp' => $proxy, | ||
'dns' => false | ||
)); | ||
|
@@ -350,12 +350,12 @@ This allows you to send both plain HTTP and TLS-encrypted HTTPS requests like th | |
```php | ||
$proxy = new Clue\React\SshProxy\SshSocksConnector('[email protected]'); | ||
|
||
$connector = new React\Socket\Connector(null, array( | ||
$connector = new React\Socket\Connector(array( | ||
'tcp' => $proxy, | ||
'dns' => false | ||
)); | ||
|
||
$browser = new React\Http\Browser(null, $connector); | ||
$browser = new React\Http\Browser($connector); | ||
|
||
$browser->get('https://example.com/')->then(function (Psr\Http\Message\ResponseInterface $response) { | ||
var_dump($response->getHeaders(), (string) $response->getBody()); | ||
|
@@ -435,7 +435,7 @@ $proxy = new Clue\React\SshProxy\SshProcessConnector('[email protected]'); | |
// or | ||
$proxy = new Clue\React\SshProxy\SshSocksConnector('[email protected]'); | ||
|
||
$connector = new React\Socket\Connector(null, array( | ||
$connector = new React\Socket\Connector(array( | ||
'tcp' => $proxy, | ||
'dns' => false, | ||
'timeout' => 3.0 | ||
|
@@ -481,7 +481,7 @@ $proxy = new Clue\React\SshProxy\SshProcessConnector('[email protected]'); | |
// or | ||
$proxy = new Clue\React\SshProxy\SshSocksConnector('[email protected]'); | ||
|
||
$connector = new React\Socket\Connector(null, array( | ||
$connector = new React\Socket\Connector(array( | ||
'tcp' => $proxy, | ||
'dns' => false | ||
)); | ||
|
@@ -495,7 +495,7 @@ $proxy = new Clue\React\SshProxy\SshProcessConnector('[email protected]'); | |
$proxy = new Clue\React\SshProxy\SshSocksConnector('[email protected]'); | ||
|
||
// set up Connector which uses Google's public DNS (8.8.8.8) | ||
$connector = new React\Socket\Connector(null, array( | ||
$connector = new React\Socket\Connector(array( | ||
'tcp' => $proxy, | ||
'dns' => '8.8.8.8' | ||
)); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters