Skip to content
This repository has been archived by the owner on Apr 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #120 from qq1176321897/dev
Browse files Browse the repository at this point in the history
修正roomId为空的问题
  • Loading branch information
Sweetnow authored May 1, 2020
2 parents cf31aae + e8a0c9f commit 7c622ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion communication/Server/CommunicationImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,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;
Expand Down
7 changes: 1 addition & 6 deletions communication/ServerChatTest/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 7c622ff

Please sign in to comment.