From cc715e58aa2dadc29a8ef6fe6075c9e2a9fedbeb Mon Sep 17 00:00:00 2001 From: whwyy Date: Wed, 29 Nov 2023 14:31:52 +0800 Subject: [PATCH] eee --- Abstracts/AsyncServer.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Abstracts/AsyncServer.php b/Abstracts/AsyncServer.php index 90fe345..bc9e653 100644 --- a/Abstracts/AsyncServer.php +++ b/Abstracts/AsyncServer.php @@ -149,7 +149,15 @@ class AsyncServer implements ServerInterface if ($port === false) { throw new Exception('Listen port fail.' . swoole_last_error()); } - println('Add port listen ' . $config->host . '::' . $config->port); + if ($config->type == Constant::SERVER_TYPE_HTTP) { + file_put_contents('php://input', 'Add http port listen ' . $config->host . '::' . $config->port, FILE_APPEND); + } else if ($config->type == Constant::SERVER_TYPE_WEBSOCKET) { + file_put_contents('php://input', 'Add wss port listen ' . $config->host . '::' . $config->port, FILE_APPEND); + } else if ($config->type == Constant::SERVER_TYPE_UDP) { + file_put_contents('php://input', 'Add udp port listen ' . $config->host . '::' . $config->port, FILE_APPEND); + } else { + file_put_contents('php://input', 'Add tcp port listen ' . $config->host . '::' . $config->port, FILE_APPEND); + } $port->set($this->resetSettings($config->type, $config->settings)); $this->onEventListen($port, $config->getEvents());