using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
|
namespace IStation.Model
|
{
|
/// <summary>
|
/// 监测数据对接会话接口
|
/// </summary>
|
public interface IMonitorDataDockingSession
|
{
|
/// <summary>
|
/// 会话标识
|
/// </summary>
|
string SessionID { get; }
|
|
/// <summary>
|
/// 会话名称
|
/// </summary>
|
string SessionName { get; set; }
|
|
/// <summary>
|
/// 注册码
|
/// </summary>
|
string RegisterCode { get; }
|
|
/// <summary>
|
/// 心跳包
|
/// </summary>
|
string Heartbeat { get; }
|
|
/// <summary>
|
/// 发送文本
|
/// </summary>
|
void Send(string message);
|
|
/// <summary>
|
/// 发送字节
|
/// </summary>
|
void Send(byte[] data);
|
|
/// <summary>
|
/// 发送字节
|
/// </summary>
|
void Send(byte[] data, int offset, int length);
|
|
/// <summary>
|
/// 关闭
|
/// </summary>
|
void Close(string reason);
|
|
/// <summary>
|
/// 是否连接
|
/// </summary>
|
bool IsConnected { get; }
|
|
/// <summary>
|
/// 会话关闭事件
|
/// </summary>
|
event Action SessionClosedEvent;
|
|
|
|
|
}
|
}
|