예제 #1
0
 public PeerToPeerTaskManager(ConnectionImpl connection, CookieProvider cookieProvider, PeerManager manager)
 {
     m_Connection         = connection;
     m_EncryptorGenerator = connection.m_EncryptorGenerator;
     m_CookieProvider     = cookieProvider;
     m_PeerManager        = manager;
 }
예제 #2
0
 public ConnectToPeerTask(ConnectionImpl connection, PeerInfo info, bool requestFlag)
 {
     m_Connection  = connection;
     ConnectionId  = info.ConnectionId;
     m_RequestFlag = requestFlag;
     m_Info        = info;
     m_RemoteEP    = info.EndPont.To();
     m_LocalEP     = info.LocalEndPont.To();
     SendHello();
 }
예제 #3
0
        internal Connection(ConnectionImpl impl)
        {
            m_Channel       = new ChannelManager(impl);
            m_StatusUpdater = new ConnectionStatusUpdater(this);
            Channel         = new ChannelMapAccessor(this, m_Channel);

            Reliable             = Channel.Reliable;
            Unreliable           = Channel.Unreliable;
            m_Impl               = impl;
            m_Impl.OnAddPeer    += OnAdd;
            m_Impl.OnRemotePeer += OnRemove;
            if (impl.UseP2P)
            {
                P2P = new P2PAccessor(m_Impl);
            }

            Config = new RuntimeConfig(this, m_Impl, m_StatusUpdater);

            foreach (var peer in m_Impl.GetPeers())
            {
                OnAdd(peer);
            }
        }
예제 #4
0
 public PeerManager(ConnectionImpl connection)
 {
     m_Connection = connection;
 }
예제 #5
0
 internal P2PAccessor(ConnectionImpl impl)
 {
     m_Impl = impl;
 }