Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use \InvalidArgumentException;
use RuntimeException;

class Client implements ConnectorInterface
final class Client implements ConnectorInterface
{
/**
*
Expand Down
12 changes: 9 additions & 3 deletions src/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use \Exception;
use React\Promise\Timer\TimeoutException;

class Server
final class Server
{
// the following error codes are only used for SOCKS5 only
/** @internal */
Expand All @@ -35,7 +35,7 @@ class Server
/** @internal */
const ERROR_ADDRESS_UNSUPPORTED = 0x08;

protected $loop;
private $loop;

private $connector;

Expand Down Expand Up @@ -104,6 +104,7 @@ public function unsetAuth()
$this->auth = null;
}

/** @internal */
public function onConnection(ConnectionInterface $connection)
{
$that = $this;
Expand All @@ -118,7 +119,9 @@ public function onConnection(ConnectionInterface $connection)
}

/**
* gracefully shutdown connection by flushing all remaining data and closing stream
* [internal] gracefully shutdown connection by flushing all remaining data and closing stream
*
* @internal
*/
public function endConnection(ConnectionInterface $stream)
{
Expand Down Expand Up @@ -179,6 +182,7 @@ private function handleSocks(ConnectionInterface $stream)
});
}

/** @internal */
public function handleSocks4(ConnectionInterface $stream, $protocolVersion, StreamReader $reader)
{
// suppliying hostnames is only allowed for SOCKS4a (or automatically detected version)
Expand Down Expand Up @@ -235,6 +239,7 @@ public function handleSocks4(ConnectionInterface $stream, $protocolVersion, Stre
});
}

/** @internal */
public function handleSocks5(ConnectionInterface $stream, $auth=null, StreamReader $reader)
{
$remote = $stream->getRemoteAddress();
Expand Down Expand Up @@ -344,6 +349,7 @@ public function handleSocks5(ConnectionInterface $stream, $auth=null, StreamRead
});
}

/** @internal */
public function connectTarget(ConnectionInterface $stream, array $target)
{
$uri = $target[0];
Expand Down
2 changes: 1 addition & 1 deletion src/StreamReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/**
* @internal
*/
class StreamReader
final class StreamReader
{
const RET_DONE = true;
const RET_INCOMPLETE = null;
Expand Down