diff --git a/FunGame.Core/Library/Common/Network/ServerSocket.cs b/FunGame.Core/Library/Common/Network/ServerSocket.cs index ae1a158..9880ca2 100644 --- a/FunGame.Core/Library/Common/Network/ServerSocket.cs +++ b/FunGame.Core/Library/Common/Network/ServerSocket.cs @@ -40,7 +40,7 @@ namespace Milimoe.FunGame.Core.Library.Common.Network PlayerThreads = new ThreadManager(MaxConnection); } - public ServerSocket StartListening(int Port = 22222, int MaxConnection = 0) + public static ServerSocket StartListening(int Port = 22222, int MaxConnection = 0) { if (MaxConnection <= 0) MaxConnection = SocketSet.MaxConnection_General; System.Net.Sockets.Socket? socket = SocketManager.StartListening(Port, MaxConnection); diff --git a/FunGame.Desktop/Model/MainModel.cs b/FunGame.Desktop/Model/MainModel.cs index b9ab94c..4420c4f 100644 --- a/FunGame.Desktop/Model/MainModel.cs +++ b/FunGame.Desktop/Model/MainModel.cs @@ -280,7 +280,7 @@ namespace Milimoe.FunGame.Desktop.Model Config.FunGame_ServerName = ServerName; Config.FunGame_Notice = ServerNotice; if (objs.Length > 1) msg = (string)objs[1]; - Socket!!.Token = msg; + Socket!.Token = msg; Main?.GetMessage($"已连接服务器:{ServerName}。\n\n********** 服务器公告 **********\n\n{ServerNotice}\n\n"); // 设置等待登录的黄灯 Main?.UpdateUI(MainControllerSet.WaitLoginAndSetYellow);