コード例 #1
0
ファイル: ConnectionTable.cs プロジェクト: javithalion/NCache
        internal void ConnectToPeerOnSecondaryAddress(Connection con_with_NIC_1)
        {
            if (con_with_NIC_1 != null)
            {
                Address secondaryAddres = con_with_NIC_1.GetSecondaryAddressofPeer();
                if (secondaryAddres != null)
                {
                    bool establishConnection = true;
                    if (local_addr_s != null)
                    {
                        establishConnection = enclosingInstance.IsJuniorThan(con_with_NIC_1.peer_addr);
                    }

                    if (establishConnection)
                    {
                        Connection con = GetConnection(secondaryAddres, con_with_NIC_1.peer_addr, true, useDualConnection, false);
                        if (con == null)
                            NCacheLog.Error("ConnectionTable.ConnectToPeerOnSeconary",   "failed to connect with " + con_with_NIC_1.peer_addr + " on second IP " + secondaryAddres);
                    }
                }

            }
        }