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>
|
2024-03-29 17:49:19 +08:00
|
|
|
|
public List<byte> Buffer { get; set; }
|
2023-12-14 18:15:04 +08:00
|
|
|
|
|
2024-03-29 17:49:19 +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()
|
|
|
|
|
{
|
2024-03-29 17:49:19 +08:00
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}
|