// using System; // using System.Collections.Concurrent; // using System.Collections.Generic; // using System.Linq; // using System.Net; // using System.Net.Sockets; // using MrWu.Debug; // using Sodao.FastSocket.Server; // using Sodao.FastSocket.Server.Messaging; // using Sodao.FastSocket.SocketBase; // // namespace Server.Net // { // public sealed class TService : AbsSocketService // { // /// // /// 链接成功事件 // /// // public event Action OnConnectedEvt; // // /// // /// 收到包事件 // /// // public event Action OnReceivedEvt; // // /// // /// 断开连接事件 // /// // public event Action OnDisconnectedEvt; // // /// // /// 发送错误事件 // /// // public event Action OnErrorEvt; // // public override void OnConnected(IConnection connection) // { // base.OnConnected(connection); // connection.BeginReceive(); // // OnConnectedEvt?.Invoke(connection); // } // // public override void OnDisconnected(IConnection connection, Exception ex) // { // base.OnDisconnected(connection, ex); // OnDisconnectedEvt?.Invoke(connection); // } // // public override void OnException(IConnection connection, Exception ex) // { // base.OnException(connection, ex); // OnErrorEvt?.Invoke(connection,ex); // } // // public override void OnReceived(IConnection connection, ThriftMessage message) // { // base.OnReceived(connection, message); // OnReceivedEvt?.Invoke(connection,message.Payload); // } // // public override void OnSendCallback(IConnection connection, Sodao.FastSocket.SocketBase.Packet packet, bool isSuccess) // { // base.OnSendCallback(connection, packet, isSuccess); // } // // } // }