mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-13 13:35:54 +00:00
Merge pull request #122 from beyondcode/analysis-QMjveg
Apply fixes from StyleCI
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
namespace App\Client;
|
||||
|
||||
use App\Client\Http\HttpClient;
|
||||
use React\Socket\Connector;
|
||||
use function Ratchet\Client\connect;
|
||||
use Ratchet\Client\WebSocket;
|
||||
use React\EventLoop\LoopInterface;
|
||||
use React\Socket\Connector;
|
||||
|
||||
class ProxyManager
|
||||
{
|
||||
@@ -59,7 +59,7 @@ class ProxyManager
|
||||
$proxyConnection->send($data);
|
||||
});
|
||||
|
||||
$proxyConnection->on('message', function ($message) use ($proxyConnection, $connection) {
|
||||
$proxyConnection->on('message', function ($message) use ($connection) {
|
||||
$connection->write($message);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Server\Connections;
|
||||
|
||||
use Evenement\EventEmitterTrait;
|
||||
use Ratchet\ConnectionInterface;
|
||||
use React\Socket\Server;
|
||||
|
||||
@@ -80,14 +79,13 @@ class TcpControlConnection extends ControlConnection
|
||||
{
|
||||
$requestId = uniqid();
|
||||
|
||||
$sharedServer->on('connection', function(\React\Socket\ConnectionInterface $connection) use ($requestId) {
|
||||
|
||||
$sharedServer->on('connection', function (\React\Socket\ConnectionInterface $connection) use ($requestId) {
|
||||
$this->proxyConnection = $connection;
|
||||
|
||||
$this->once('tcp_proxy_ready_'.$requestId, function (ConnectionInterface $proxy) use ($connection) {
|
||||
$this->proxy = $proxy;
|
||||
|
||||
$connection->on('data', function($data) use ($proxy) {
|
||||
$connection->on('data', function ($data) use ($proxy) {
|
||||
$proxy->send($data);
|
||||
});
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ class ControlMessageController implements MessageComponentInterface
|
||||
->then(function ($user) use ($connection, $data) {
|
||||
if ($data->type === 'http') {
|
||||
$this->handleHttpConnection($connection, $data, $user);
|
||||
} elseif($data->type === 'tcp') {
|
||||
} elseif ($data->type === 'tcp') {
|
||||
$this->handleTcpConnection($connection, $data, $user);
|
||||
}
|
||||
}, function () use ($connection) {
|
||||
|
||||
Reference in New Issue
Block a user