SessionHandler.cs 940 B

12345678910111213141516171819202122232425
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace SuperSocket.SocketBase
  6. {
  7. /// <summary>
  8. /// Used for session level event handler
  9. /// </summary>
  10. /// <typeparam name="TAppSession">the type of the target session</typeparam>
  11. /// <param name="session">the target session</param>
  12. public delegate void SessionHandler<TAppSession>(TAppSession session)
  13. where TAppSession : IAppSession;
  14. /// <summary>
  15. /// Used for session level event handler
  16. /// </summary>
  17. /// <typeparam name="TAppSession">the type of the target session</typeparam>
  18. /// <typeparam name="TParam">the target session</typeparam>
  19. /// <param name="session">the target session</param>
  20. /// <param name="value">the event parameter</param>
  21. public delegate void SessionHandler<TAppSession, TParam>(TAppSession session, TParam value)
  22. where TAppSession : IAppSession;
  23. }