DelegateHandler.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. namespace IFramework.Net
  2. {
  3. /// <summary>
  4. /// 接收数据处理,返回的是实际接收到的数据
  5. /// </summary>
  6. /// <param name="sToken"></param>
  7. /// <param name="content"></param>
  8. public delegate void OnReceivedHandler(SocketToken sToken, string content);
  9. /// <summary>
  10. /// 接受数据处理,返回预设的缓冲区大小和实际接收到的数据偏移和数量
  11. /// </summary>
  12. /// <param name="session"></param>
  13. public delegate void OnReceivedSegmentHandler(SegmentToken session);
  14. /// <summary>
  15. /// 发送数据处理
  16. /// </summary>
  17. /// <param name="session"></param>
  18. public delegate void OnSentHandler(SegmentToken session);
  19. /// <summary>
  20. /// 接受连接对象处理
  21. /// </summary>
  22. /// <param name="sToken"></param>
  23. public delegate void OnAcceptedHandler(SocketToken sToken);
  24. /// <summary>
  25. /// 断开连接对象处理
  26. /// </summary>
  27. /// <param name="sToken"></param>
  28. public delegate void OnDisconnectedHandler(SocketToken sToken);
  29. /// <summary>
  30. /// 建立连接对象处理
  31. /// </summary>
  32. /// <param name="sToken"></param>
  33. /// <param name="isConnected"></param>
  34. public delegate void OnConnectedHandler(SocketToken sToken,bool isConnected);
  35. }