From e8a0c9f6658e4d7444877b5f96110689ae953084 Mon Sep 17 00:00:00 2001 From: qq1176321897 <1176321897@qq.com> Date: Fri, 1 May 2020 17:13:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3roomId=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- communication/Server/CommunicationImpl.cs | 2 +- communication/ServerChatTest/Program.cs | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/communication/Server/CommunicationImpl.cs b/communication/Server/CommunicationImpl.cs index 76eeead..29f68df 100644 --- a/communication/Server/CommunicationImpl.cs +++ b/communication/Server/CommunicationImpl.cs @@ -44,7 +44,7 @@ public string Token { var json = JObject.Parse(decoder.Decode(value)); Constants.Debug($"Parsing roomID from {json}"); - roomID = (string)json["roomID"]; + roomID = (string)json["roomId"]; Constants.Debug($"roomID = {roomID}"); } token = value; diff --git a/communication/ServerChatTest/Program.cs b/communication/ServerChatTest/Program.cs index 671c1d8..674b981 100644 --- a/communication/ServerChatTest/Program.cs +++ b/communication/ServerChatTest/Program.cs @@ -40,13 +40,8 @@ public static void Main(string[] args) //comm.EndPoint = new IPEndPoint(IPAddress.Parse(t[0]), ushort.Parse(t[1])); //comm.ID = args[1]; Constants.ServerPort = 20000; - comm.IsOffline = false; comm.ServerPort = Constants.ServerPort; - comm.Token = new JwtEncoder(new HMACSHA256Algorithm(), new JsonNetSerializer(), new JwtBase64UrlEncoder()) - .Encode(new JObject - { - ["roomID"] = "123" - }, "key"); + comm.Token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb29tSWQiOjEsInNlcnZlciI6IlRIVUFJIiwiaWF0IjoxNTg4MjQ0MzA4LCJleHAiOjE1ODgyODc1MDh9.QY5y44mU769_jlLboaqppycI1ijgZnpgkS2NkQWP3XI"; comm.Initialize(); comm.MsgProcess += new MessageHandler(PrintChatMessage); comm.GameStart();