using System;
using Server.Data.Module;
using GameData;

namespace Server
{
    /// <summary>
    /// 服务管理
    /// </summary>
    public interface IServer
    {
        /// <summary>
        /// 服务器状态
        /// </summary>
        ServerState state {
            get;
            set;
        }

        /// <summary>
        /// 服务器名称
        /// </summary>
        string ServerName {
            get;
        }

        /// <summary>
        /// 模块单元
        /// </summary>
        ModuleUtile myUtil {
            get;
        }

        /// <summary>
        /// 模块类型
        /// </summary>
        ModuleType myType {
            get;
        }

        /// <summary>
        /// 服务器启动
        /// </summary>
        bool Start();

        /// <summary>
        /// 主进程
        /// </summary>
        void Loop();

        /// <summary>
        /// 服务器关闭
        /// </summary>
        void Close();

    }
}
