Skip to content

Commit bc7f776

Browse files
committed
API documentation for SOCKS server URI
1 parent 6fee452 commit bc7f776

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/Client.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@ class Client
4646

4747
protected $auth = null;
4848

49-
public function __construct($socksUrl, LoopInterface $loop, ConnectorInterface $connector = null, Resolver $resolver = null)
49+
public function __construct($socksUri, LoopInterface $loop, ConnectorInterface $connector = null, Resolver $resolver = null)
5050
{
5151
// assume default scheme if none is given
52-
if (strpos($socksUrl, '://') === false) {
53-
$socksUrl = 'socks://' . $socksUrl;
52+
if (strpos($socksUri, '://') === false) {
53+
$socksUri = 'socks://' . $socksUri;
5454
}
5555

56-
// parse URL into individual parts
57-
$parts = parse_url($socksUrl);
56+
// parse URI into individual parts
57+
$parts = parse_url($socksUri);
5858
if (!$parts || !isset($parts['scheme'], $parts['host'], $parts['port'])) {
59-
throw new \InvalidArgumentException('Invalid SOCKS URL');
59+
throw new \InvalidArgumentException('Invalid SOCKS server URI "' . $socksUri . '"');
6060
}
6161

6262
if ($resolver === null) {

0 commit comments

Comments
 (0)