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