mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-15 14:35:55 +00:00
perform connection callbacks
This commit is contained in:
@@ -74,9 +74,20 @@ class ConnectionManager implements ConnectionManagerContract
|
|||||||
|
|
||||||
$this->logger->logSubdomain($storedConnection->authToken, $storedConnection->subdomain);
|
$this->logger->logSubdomain($storedConnection->authToken, $storedConnection->subdomain);
|
||||||
|
|
||||||
|
$this->performConnectionCallback($storedConnection);
|
||||||
|
|
||||||
return $storedConnection;
|
return $storedConnection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function performConnectionCallback(ControlConnection $connection)
|
||||||
|
{
|
||||||
|
$connectionCallback = config('expose.admin.connection_callback');
|
||||||
|
|
||||||
|
if ($connectionCallback !== null && class_exists($connectionCallback)) {
|
||||||
|
app($connectionCallback)->handle($connection);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function storeTcpConnection(int $port, ConnectionInterface $connection): ControlConnection
|
public function storeTcpConnection(int $port, ConnectionInterface $connection): ControlConnection
|
||||||
{
|
{
|
||||||
$clientId = (string) uniqid();
|
$clientId = (string) uniqid();
|
||||||
|
|||||||
@@ -299,6 +299,17 @@ return [
|
|||||||
*/
|
*/
|
||||||
'subdomain_generator' => \App\Server\SubdomainGenerator\RandomSubdomainGenerator::class,
|
'subdomain_generator' => \App\Server\SubdomainGenerator\RandomSubdomainGenerator::class,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Connection Callback
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This is a callback method that will be called when a new connection is
|
||||||
|
| established.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
'connection_callback' => null,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Users
|
| Users
|
||||||
|
|||||||
Reference in New Issue
Block a user