using System.Text; using Team.Communicate.State; namespace Team.Communicate.EventArg { public class ServerEventArgs : System.EventArgs { /// <summary> /// 提示信息 /// </summary> public readonly string Message; /// <summary> /// 客户端状态封装类 /// </summary> public TcpClientState State; /// <summary> /// 是否已经处理过了 /// </summary> public bool IsHandled { get; set; } public ServerEventArgs(string msg) { Message = msg; IsHandled = false; } public ServerEventArgs(TcpClientState state) { State = state; IsHandled = false; Message = Encoding.UTF8.GetString(State.Memory.ToArray()); } public ServerEventArgs(string msg, TcpClientState state) { Message = msg; State = state; IsHandled = false; } } }