using System;
using GameMessage;

namespace Server.Net
{
    public interface IUserSession
    {
        long Id { get; }

        /// <summary>
        /// 实例ID
        /// </summary>
        long InstanceId { get; }
        
        /// <summary>
        /// 是否断开连接
        /// </summary>
        bool IsDisConnected { get; }

        /// <summary>
        /// 登录验证码
        /// </summary>
        string VerificationCode { get; set; }
        
        /// <summary>
        /// 用户数据
        /// </summary>
        SessionUserData UserData { get; }

        /// <summary>
        /// 远端ip地址
        /// </summary>
        string RemoteIPAddress
        {
            get;
        }

        void Send(byte[] buffer, Type messageType);
        
        void Send(MessageData messageData);

        void BindUser(int userid, string uuid, int clientVer, int plat,string deviceInfo,bool isNewUser,string storeType, bool reset = false);

        void DisConnected();
    }
}