This commit is contained in:
2020-09-01 15:31:22 +08:00
parent 3a12ad4db2
commit 72a6656647
3 changed files with 4 additions and 4 deletions
+1
View File
@@ -37,6 +37,7 @@ class Http extends Server
*/
public function __construct($application, $host, $port = null, $mode = null, $sock_type = null)
{
$application->set($host . ':' . $port, $this);
$this->application = $application;
parent::__construct($host, $port, $mode, $sock_type);
}
+1
View File
@@ -45,6 +45,7 @@ abstract class Service extends Server
*/
public function __construct($application, $host, $port = null, $mode = null, $sock_type = null)
{
$application->set($host . ':' . $port, $this);
$this->application = $application;
parent::__construct($host, $port, $mode, $sock_type);
}
+2 -4
View File
@@ -48,6 +48,7 @@ class WebSocket extends Server
*/
public function __construct($application, $host, $port = null, $mode = null, $sock_type = null)
{
$application->set($host . ':' . $port, $this);
$this->application = $application;
parent::__construct($host, $port, $mode, $sock_type);
}
@@ -67,10 +68,7 @@ class WebSocket extends Server
{
parent::set($settings);
$application = Snowflake::get();
$application->set(WebSocket::class, $this);
ServerManager::set($this, $settings, $application, $events, $config);
ServerManager::set($this, $settings, $this->application, $events, $config);
}