IServerChannelSender.cs 897 B

12345678910111213141516171819202122232425
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace Taobao.Top.Link.Channel
  5. {
  6. /// <summary>the channel that can send message to client
  7. /// </summary>
  8. public interface IServerChannelSender : IChannelSender
  9. {
  10. /// <summary>weather channel is open
  11. /// </summary>
  12. bool IsOpen { get; }
  13. /// <summary>get channel context by given object key, channel conext can be used to store something that belong itself
  14. /// </summary>
  15. /// <param name="key"></param>
  16. /// <returns></returns>
  17. object GetContext(object key);
  18. /// <summary>set channel context by given object key, channel conext can be used to store something that belong itself
  19. /// </summary>
  20. /// <param name="key"></param>
  21. /// <param name="value"></param>
  22. void SetContext(object key, object value);
  23. }
  24. }