namespace XGame.Framework.Network { public enum SessionStatus { NONE, CONNECTING, CONNECTED, CONNECT_TIMEOUT, CONNECT_FAIL, FREE, DISCONNECT_ERROR, SEND_ERROR, RECV_ERROR, CLOSED } public interface IRemoteSession { /// /// 会话状态 /// SessionStatus Status { get; } /// /// 远端地址解析信息 /// SessionAddress Address { get; } /// /// 是否连接 /// /// /// bool IsConnected(bool bPrecice); /// /// 断开连接 /// void Disconnect(); /// /// 发送 /// /// /// /// /// bool Send(byte[] bytes, int offset, int length); /// /// 连接 /// /// /// void Connect(AddressInfo address); } }