xy 3 weeks ago
parent
commit
e970d62943
2 changed files with 3 additions and 2 deletions
  1. 1 0
      src/GameClient.php
  2. 2 2
      src/main.php

+ 1 - 0
src/GameClient.php

@@ -35,6 +35,7 @@ class GameClient {
         $userResponse->setUserId($this->userId);
         $binaryData = $userResponse->serializeToString();
         $this->client->sendBinary(MsgID::REQFRIENDLIST, $binaryData);
+        echo $this->userId;
         echo "已发送获取好友列表请求\n";
     }
     public function outGame(){

+ 2 - 2
src/main.php

@@ -25,7 +25,7 @@ class ProgramMain {
          // 设置非阻塞标准输入
         stream_set_blocking(STDIN, false);
 
-        echo "游戏客户端交互模式(输入命令执行,如 login, outGame, exit,getFriens\n";
+        echo "游戏客户端交互模式(输入命令执行,如 login, outGame, exit,getFriends\n";
         
         while (true) {
             $input = readline("> ");
@@ -49,7 +49,7 @@ class ProgramMain {
                     $client->close();
                     exit(0);
                 default:
-                    echo "未知命令。可用命令: login, outGame, exit\n";
+                    echo "未知命令。可用命令: login, outGame,getFriends, exit\n";
             }
         }
     }