yangle
2024-11-29 a23a1a0d44a05b60539b9984c16938d6bdfa6a77
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);
    }
}