INetTokenPoolProvider.cs 667 B

12345678910111213141516171819
  1. using System.Collections.Generic;
  2. namespace IFramework.Net
  3. {
  4. public interface INetTokenPoolProvider
  5. {
  6. int ConnectionTimeout { get; set; }
  7. int Count { get; }
  8. void TimerEnable(bool isContinue);
  9. NetConnectionToken GetTopToken();
  10. void InsertToken(NetConnectionToken ncToken);
  11. bool RemoveToken(NetConnectionToken ncToken,bool isClose=true);
  12. void Clear(bool isClose = true);
  13. NetConnectionToken GetTokenById(int Id);
  14. NetConnectionToken GetTokenBySocketToken(SocketToken sToken);
  15. IEnumerable<NetConnectionToken> Reader();
  16. bool RefreshExpireToken(SocketToken sToken);
  17. }
  18. }