From c9493a5983377acaf8fa10657fbd163878e1f681 Mon Sep 17 00:00:00 2001
From: zhoudw <zhoudw@infobird.com>
Date: Wed, 16 Mar 2022 09:56:41 +0800
Subject: [PATCH] 端口

---
 runtime/container/proxy/App_Controller_WebsocketController.proxy.php |   20 +++-----------------
 1 files changed, 3 insertions(+), 17 deletions(-)

diff --git a/runtime/container/proxy/App_Controller_WebsocketController.proxy.php b/runtime/container/proxy/App_Controller_WebsocketController.proxy.php
index 91b9b35..0d761bf 100644
--- a/runtime/container/proxy/App_Controller_WebsocketController.proxy.php
+++ b/runtime/container/proxy/App_Controller_WebsocketController.proxy.php
@@ -3,7 +3,7 @@
 /*
  * @Author: your name
  * @Date: 2021-12-24 10:26:10
- * @LastEditTime: 2021-12-24 17:11:44
+ * @LastEditTime: 2021-12-24 17:21:42
  * @LastEditors: Please set LastEditors
  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  * @FilePath: /hy-websocket/app/Controller/WebsocketController.php
@@ -14,21 +14,12 @@
 use Hyperf\Contract\OnCloseInterface;
 use Hyperf\Contract\OnMessageInterface;
 use Hyperf\Contract\OnOpenInterface;
-use Hyperf\Contract\OnHandShakeInterface;
-use Hyperf\Utils\Codec\Json;
 use Swoole\Http\Request;
 use Swoole\Http\Response;
 use Swoole\WebSocket\Frame;
 use Swoole\WebSocket\Server;
-use Hyperf\Redis\Redis;
 use Hyperf\Di\Annotation\Inject;
-use Hyperf\Config\Annotation\Value;
-use App\Utils\guid;
-use App\Utils\HashMap;
-use App\Utils\Http;
-use App\Utils\PcmToWave;
 use App\Service\TransferService;
-use Psr\Container\ContainerInterface;
 use Hyperf\Logger\LoggerFactory;
 use Hyperf\Contract\ConfigInterface;
 class WebsocketController implements OnMessageInterface, OnOpenInterface, OnCloseInterface
@@ -40,13 +31,6 @@
      * @var TransferService
      */
     private $transferService;
-    /**
-     * 
-     * @Inject
-     * @var HashMap
-     */
-    private $HashMap;
-    //存放音频写入句柄
     /**
      * 
      * @var \Psr\Log\LoggerInterface
@@ -100,6 +84,7 @@
             $action = substr($url, strrpos($url, "/") + 1);
             switch ($action) {
                 case "reg":
+                    $this->logger->info('reg', $frameData);
                     $groupId = $data['group_id'];
                     $session = $data['session_id'];
                     $this->bind($groupId, '', $frame->fd);
@@ -121,6 +106,7 @@
                     $server->push($frame->fd, json_encode($ret));
                     break;
                 case "data":
+                    $this->logger->info('data', $frameData);
                     $groupId = $data['group_id'];
                     $ret['event'] = "data";
                     $ret['data'] = $data;

--
Gitblit v1.8.0