IConnectedPlugin.cs 860 B

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using TouchSocket.Core;
  7. namespace TouchSocket.Sockets
  8. {
  9. /// <summary>
  10. /// 具有完成连接动作的插件接口
  11. /// </summary>
  12. public interface IConnectedPlugin:IPlugin
  13. {
  14. /// <summary>
  15. /// 客户端连接成功后触发
  16. /// </summary>
  17. /// <param name="client">客户端</param>
  18. /// <param name="e">参数</param>
  19. [AsyncRaiser]
  20. void OnConnected(object client, TouchSocketEventArgs e);
  21. /// <summary>
  22. /// 客户端连接成功后触发
  23. /// </summary>
  24. /// <param name="client"></param>
  25. /// <param name="e"></param>
  26. /// <returns></returns>
  27. Task OnConnectedAsync(object client, TouchSocketEventArgs e);
  28. }
  29. }