using Milimoe.FunGame.Core.Api.Transmittal;
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Common.Addon;
using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Core.Interface.Base
{
public interface IServerModel
{
///
/// 服务器实例是否在运行
///
public bool Running { get; }
///
/// 客户端的套接字实例
///
public ISocketMessageProcessor? Socket { get; }
///
/// 客户端的数据库连接实例
///
public SQLHelper? SQLHelper { get; }
///
/// 客户端的邮件服务实例
///
public MailSender? MailSender { get; }
///
/// 客户端的用户实例,在用户登录后有效
///
public User User { get; }
///
/// 客户端的名称,默认是客户端的IP地址
///
public string ClientName { get; }
///
/// 客户端是否启动了开发者模式
///
public bool IsDebugMode { get; }
///
/// 客户端所在的房间
///
public Room InRoom { get; set; }
///
/// 客户端的游戏模组服务器
///
public GameModuleServer? NowGamingServer { get; set; }
///
/// 向客户端发送消息
///
///
///
///
public Task Send(SocketMessageType type, params object[] objs);
///
/// 向客户端发送系统消息
///
///
///
///
///
///
public void SendSystemMessage(ShowMessageType showtype, string msg, string title, int autoclose, params string[] usernames);
///
/// 获取客户端的名称,通常未登录时显示为客户端的IP地址,登录后显示为账号名
///
///
public string GetClientName();
}
}