mirror of
https://github.com/project-redbud/FunGame-Server.git
synced 2025-12-05 16:16:34 +00:00
Update Core (#5)
This commit is contained in:
parent
59d5d50853
commit
5bd7097790
@ -2,9 +2,9 @@
|
|||||||
using Milimoe.FunGame.Core.Api.Transmittal;
|
using Milimoe.FunGame.Core.Api.Transmittal;
|
||||||
using Milimoe.FunGame.Core.Api.Utility;
|
using Milimoe.FunGame.Core.Api.Utility;
|
||||||
using Milimoe.FunGame.Core.Entity;
|
using Milimoe.FunGame.Core.Entity;
|
||||||
|
using Milimoe.FunGame.Core.Interface.Base;
|
||||||
using Milimoe.FunGame.Core.Library.Common.Network;
|
using Milimoe.FunGame.Core.Library.Common.Network;
|
||||||
using Milimoe.FunGame.Core.Library.Constant;
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
using Milimoe.FunGame.Core.Library.Server;
|
|
||||||
using Milimoe.FunGame.Core.Library.SQLScript.Common;
|
using Milimoe.FunGame.Core.Library.SQLScript.Common;
|
||||||
using Milimoe.FunGame.Core.Library.SQLScript.Entity;
|
using Milimoe.FunGame.Core.Library.SQLScript.Entity;
|
||||||
using Milimoe.FunGame.Server.Others;
|
using Milimoe.FunGame.Server.Others;
|
||||||
@ -12,16 +12,16 @@ using Milimoe.FunGame.Server.Utility;
|
|||||||
|
|
||||||
namespace Milimoe.FunGame.Server.Model
|
namespace Milimoe.FunGame.Server.Model
|
||||||
{
|
{
|
||||||
public class ServerModel : BaseModel
|
public class ServerModel : IServerModel
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Public
|
* Public
|
||||||
*/
|
*/
|
||||||
public override bool Running => _Running;
|
public bool Running => _Running;
|
||||||
public override ClientSocket? Socket => _Socket;
|
public ClientSocket? Socket => _Socket;
|
||||||
public override Task? Task => _Task;
|
public Task? Task => _Task;
|
||||||
public override string ClientName => _ClientName;
|
public string ClientName => _ClientName;
|
||||||
public override User? User => _User;
|
public User? User => _User;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Private
|
* Private
|
||||||
@ -57,7 +57,7 @@ namespace Milimoe.FunGame.Server.Model
|
|||||||
GetUsersCount();
|
GetUsersCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool Read(ClientSocket socket)
|
public bool Read(ClientSocket socket)
|
||||||
{
|
{
|
||||||
// 接收客户端消息
|
// 接收客户端消息
|
||||||
try
|
try
|
||||||
@ -410,7 +410,7 @@ namespace Milimoe.FunGame.Server.Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool Send(ClientSocket socket, SocketMessageType type, params object[] objs)
|
public bool Send(ClientSocket socket, SocketMessageType type, params object[] objs)
|
||||||
{
|
{
|
||||||
// 发送消息给客户端
|
// 发送消息给客户端
|
||||||
try
|
try
|
||||||
@ -444,7 +444,7 @@ namespace Milimoe.FunGame.Server.Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Start()
|
public void Start()
|
||||||
{
|
{
|
||||||
Task StreamReader = Task.Factory.StartNew(() =>
|
Task StreamReader = Task.Factory.StartNew(() =>
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using Milimoe.FunGame.Core.Library.Constant;
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
using Milimoe.FunGame.Core.Library.Server;
|
using Milimoe.FunGame.Core.Library.Common.Architecture;
|
||||||
|
|
||||||
namespace Milimoe.FunGame.Server.Others
|
namespace Milimoe.FunGame.Server.Others
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
using MySql.Data.MySqlClient;
|
using MySql.Data.MySqlClient;
|
||||||
using Milimoe.FunGame.Core.Api.Utility;
|
using Milimoe.FunGame.Core.Api.Utility;
|
||||||
using Milimoe.FunGame.Core.Library.Server;
|
using Milimoe.FunGame.Core.Library.Common.Architecture;
|
||||||
|
|
||||||
namespace Milimoe.FunGame.Server.Utility.DataUtility
|
namespace Milimoe.FunGame.Server.Utility.DataUtility
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
using MySql.Data.MySqlClient;
|
using MySql.Data.MySqlClient;
|
||||||
using Milimoe.FunGame.Core.Api.Transmittal;
|
using Milimoe.FunGame.Core.Api.Transmittal;
|
||||||
using Milimoe.FunGame.Core.Library.Constant;
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
using Milimoe.FunGame.Core.Library.Server;
|
using Milimoe.FunGame.Core.Library.Common.Architecture;
|
||||||
using Milimoe.FunGame.Server.Utility.DataUtility;
|
using Milimoe.FunGame.Server.Utility.DataUtility;
|
||||||
using Milimoe.FunGame.Server.Others;
|
using Milimoe.FunGame.Server.Others;
|
||||||
using Milimoe.FunGame.Server.Model;
|
using Milimoe.FunGame.Server.Model;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user