Beispiel #1
0
        public NetLink(int nLinkID, INetLinkSink linkSink, INetLinkMonitor monitor = null)
        {
            m_NetLinkSink    = linkSink;
            m_NetLinkMonitor = monitor;
            m_nLinkID        = nLinkID;

            NetManager.Instance().NetLinkSink    = linkSink;
            NetManager.Instance().NetLinkMonitor = monitor;
        }
Beispiel #2
0
        public NetLink(int nLinkID, INetLinkSink linkSink, INetLinkMonitor monitor = null)
        {
            m_NetLinkSink = linkSink;
            m_NetLinkMonitor = monitor;
            m_nLinkID = nLinkID;

            //TODO
           // NetManager.Instance().NetLinkSink = linkSink;
            //NetManager.Instance().NetLinkMonitor = monitor;
        }
Beispiel #3
0
        // 创建网络连接
        public INetLink CreateNetLink(INetLinkSink linkSink, INetLinkMonitor monitor = null)
        {
            m_NetLink = new NetLink(++m_nLinkIDSeed, linkSink, monitor);
            if (m_NetLink == null)
            {
                Utility.Log.Error("CreateNetLink失败!");
                return(null);
            }

            return(m_NetLink);
        }
Beispiel #4
0
 void Start()
 {
     m_monitor = NetService.Instance.CurrentMoniter;
 }