diff --git a/http-server/Events/Http.php b/http-server/Events/Http.php index 865bb5a4..ed18553b 100644 --- a/http-server/Events/Http.php +++ b/http-server/Events/Http.php @@ -37,7 +37,7 @@ class Http extends Server */ public function __construct($application, $host, $port = null, $mode = null, $sock_type = null) { - $application->set($host . ':' . $port, $this); + $application->set(Http::class, $this); $this->application = $application; parent::__construct($host, $port, $mode, $sock_type); } diff --git a/http-server/Events/WebSocket.php b/http-server/Events/WebSocket.php index 9eeeab13..c5740754 100644 --- a/http-server/Events/WebSocket.php +++ b/http-server/Events/WebSocket.php @@ -48,7 +48,7 @@ class WebSocket extends Server */ public function __construct($application, $host, $port = null, $mode = null, $sock_type = null) { - $application->set($host . ':' . $port, $this); + $application->set(WebSocket::class, $this); $this->application = $application; parent::__construct($host, $port, $mode, $sock_type); }