private bool mDisconnectEvent; // 断开消息,必须要在主线程中处理 public INetConnector(IPacketFormat packetFormat, IPacketHandlerManager packetHandlerManager) { mUid = -1; mRemoteHost = null; OnConnected = null; OnRecieved = null; OnDisconnected = null; OnError = null; mPacketFormat = packetFormat; mPacketHandlerManager = packetHandlerManager; mDisconnectEvent = false; }
public virtual void Connect(string address, int port) { mRemoteHost = new RemoteHost(address, port); }