TcpDelegate.cs 840 B

123456789101112131415161718192021222324252627282930
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace Azylee.YeahWeb.SocketUtils.TcpUtils
  6. {
  7. /// <summary>
  8. /// Tcp 工具 委托声明
  9. /// </summary>
  10. public class TcpDelegate
  11. {
  12. /// <summary>
  13. /// 接受消息委托
  14. /// </summary>
  15. /// <param name="host"></param>
  16. /// <param name="model"></param>
  17. public delegate void ReceiveMessage(string host, TcpDataModel model);
  18. /// <summary>
  19. /// Tcp 连接消息委托
  20. /// </summary>
  21. /// <param name="host"></param>
  22. public delegate void OnConnect(string host);
  23. /// <summary>
  24. /// Tcp 断开连接消息委托
  25. /// </summary>
  26. /// <param name="host"></param>
  27. public delegate void OnDisconnect(string host);
  28. }
  29. }