ISocketServer.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Security.Authentication;
  6. using SuperSocket.Common;
  7. namespace SuperSocket.SocketBase
  8. {
  9. /// <summary>
  10. /// It is the basic interface of SocketServer,
  11. /// SocketServer is the abstract server who really listen the comming sockets directly.
  12. /// </summary>
  13. public interface ISocketServer
  14. {
  15. /// <summary>
  16. /// Starts this instance.
  17. /// </summary>
  18. /// <returns></returns>
  19. bool Start();
  20. /// <summary>
  21. /// Resets the session's security protocol.
  22. /// </summary>
  23. /// <param name="session">The session.</param>
  24. /// <param name="security">The security protocol.</param>
  25. void ResetSessionSecurity(IAppSession session, SslProtocols security);
  26. /// <summary>
  27. /// Gets a value indicating whether this instance is running.
  28. /// </summary>
  29. /// <value>
  30. /// <c>true</c> if this instance is running; otherwise, <c>false</c>.
  31. /// </value>
  32. bool IsRunning { get; }
  33. /// <summary>
  34. /// Gets the information of the sending queue pool.
  35. /// </summary>
  36. /// <value>
  37. /// The sending queue pool.
  38. /// </value>
  39. IPoolInfo SendingQueuePool { get; }
  40. /// <summary>
  41. /// Stops this instance.
  42. /// </summary>
  43. void Stop();
  44. }
  45. }