mirror of
https://github.com/project-redbud/FunGame-Core.git
synced 2025-12-05 08:09:02 +00:00
StartListening应该是静态方法
This commit is contained in:
parent
6471474c59
commit
3bf075a15d
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user