using System; using System.Collections.Generic; using System.Text; namespace TcpEventBus { public interface ISocket { public int ReceiveTimeout { get; } public Action OnConnected { get; set; } public Action> OnData { get; set; } public Action OnDisconnected { get; set; } public bool IsConnect { get; } public void Disconnect(); public bool IsService { get; } public void Start(); /// /// 发生数据 /// /// public void Send(byte[] data); } }