HaoYueNet/NetLib/HaoYueNet.ServerNetwork/NetWork/AsyncUserToken.cs

55 lines
1.3 KiB
C#
Raw Normal View History

2023-12-14 18:15:04 +08:00
using System.Net;
2021-12-10 23:38:40 +08:00
using System.Net.Sockets;
namespace HaoYueNet.ServerNetwork
{
public class AsyncUserToken
{
/// <summary>
/// 客户端IP地址
/// </summary>
public IPAddress IPAddress { get; set; }
/// <summary>
/// 远程地址
/// </summary>
public EndPoint Remote { get; set; }
/// <summary>
/// 通信SOKET
/// </summary>
public Socket Socket { get; set; }
/// <summary>
/// 连接时间
/// </summary>
public DateTime ConnectTime { get; set; }
/// <summary>
/// 所属用户信息
/// </summary>
public object UserInfo { get; set; }
/// <summary>
/// 数据缓存区
/// </summary>
public List<byte> Buffer { get; set; }
2023-12-14 18:15:04 +08:00
//public MemoryStream memoryStream { get; set; }
2023-12-14 18:15:04 +08:00
2021-12-10 23:38:40 +08:00
public AsyncUserToken()
{
this.Buffer = new List<byte>();
//this.memoryStream = new MemoryStream();
2021-12-10 23:38:40 +08:00
}
/// <summary>
/// 响应倒计时计数
/// </summary>
public int RevIndex { get; set; } = 0;
/// <summary>
/// 发送倒计时计数
/// </summary>
public int SendIndex { get; set; } = 0;
}
}