1
wtt
79 分钟以前 409529b1a6e7478d691e95f84713bdd5ad5ffed2
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
26
27
28
29
30
using System;
using System.Collections.Generic;
using System.Text;
 
namespace Taobao.Top.Link.Channel
{
    /// <summary>the channel that client connect to server
    /// </summary>
    public interface IClientChannel : IChannelSender
    {
        /// <summary>while message received on this channel
        /// </summary>
        EventHandler<ChannelContext> OnMessage { get; set; }
        /// <summary>while error occur on this channel
        /// </summary>
        EventHandler<ChannelContext> OnError { get; set; }
        /// <summary>while channel was closed by given reason
        /// </summary>
        EventHandler<ChannelClosedEventArgs> OnClosed { get; set; }
        /// <summary>get or set remote uri
        /// </summary>
        Uri Uri { get; set; }
        /// <summary>weather the channel is valid
        /// </summary>
        bool IsConnected { get; }
        /// <summary>timer for heartbeat if set
        /// </summary>
        ResetableTimer HeartbeatTimer { set; }
    }
}