diff --git a/FunGame.Server/Controller/ServerController.cs b/FunGame.Server/Controller/ServerController.cs deleted file mode 100644 index 048c59d..0000000 --- a/FunGame.Server/Controller/ServerController.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace FunGame.Server.Controller -{ - internal class ServerController - { - } -} diff --git a/FunGame.Server/Model/ServerModel.cs b/FunGame.Server/Model/ServerModel.cs index 4c3a22b..d244339 100644 --- a/FunGame.Server/Model/ServerModel.cs +++ b/FunGame.Server/Model/ServerModel.cs @@ -2,20 +2,21 @@ using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Library.Common.Network; using Milimoe.FunGame.Core.Library.Constant; +using Milimoe.FunGame.Core.Library.Server; using Milimoe.FunGame.Server.Others; using Milimoe.FunGame.Server.Utility; namespace Milimoe.FunGame.Server.Model { - public class ServerModel + public class ServerModel : BaseModel { /** * Public */ - public bool Running = false; - public ClientSocket? Socket = null; - public Task? Task = null; - public string ClientName = ""; + public new bool Running = false; + public new ClientSocket? Socket = null; + public new Task? Task = null; + public new string ClientName = ""; /** * Private @@ -32,7 +33,7 @@ namespace Milimoe.FunGame.Server.Model Running = running; } - public bool Read(ClientSocket socket) + public override bool Read(ClientSocket socket) { // 接收客户端消息 try @@ -140,7 +141,7 @@ namespace Milimoe.FunGame.Server.Model } } - public bool Send(ClientSocket socket, SocketMessageType type, params object[] objs) + public override bool Send(ClientSocket socket, SocketMessageType type, params object[] objs) { // 发送消息给客户端 try @@ -165,7 +166,7 @@ namespace Milimoe.FunGame.Server.Model } } - public void Start() + public override void Start() { Task StreamReader = Task.Factory.StartNew(() => { diff --git a/FunGame.Server/Others/Config.cs b/FunGame.Server/Others/Config.cs index b5bad7e..8073962 100644 --- a/FunGame.Server/Others/Config.cs +++ b/FunGame.Server/Others/Config.cs @@ -1,8 +1,8 @@ -using Milimoe.FunGame.Core.Library.Constant; -using Milimoe.FunGame.Server.Model; -using System.Collections; +using System.Collections; using System.Collections.Concurrent; using System.Text; +using Milimoe.FunGame.Core.Library.Constant; +using Milimoe.FunGame.Server.Model; namespace Milimoe.FunGame.Server.Others { diff --git a/FunGame.Server/Utility/Utility.cs b/FunGame.Server/Utility/Utility.cs index 5936413..1d7dd3c 100644 --- a/FunGame.Server/Utility/Utility.cs +++ b/FunGame.Server/Utility/Utility.cs @@ -1,8 +1,8 @@ -using Milimoe.FunGame.Core.Api.Utility; +using System.Collections; +using MySql.Data.MySqlClient; +using Milimoe.FunGame.Core.Api.Utility; using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Server.Others; -using MySql.Data.MySqlClient; -using System.Collections; namespace Milimoe.FunGame.Server.Utility {