예제 #1
0
        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;
        }
예제 #2
0
 public virtual void Connect(string address, int port)
 {
     mRemoteHost = new RemoteHost(address, port);
 }