예제 #1
0
파일: Timer.cs 프로젝트: chuanqingli/ice
            public override int GetHashCode()
            {
                int h = 5381;

                HashUtil.hashAdd(ref h, id);
                HashUtil.hashAdd(ref h, scheduledTime);
                return(h);
            }
예제 #2
0
파일: LocatorInfo.cs 프로젝트: zk2013/ice
            public override int GetHashCode()
            {
                int h = 5381;

                HashUtil.hashAdd(ref h, _id);
                HashUtil.hashAdd(ref h, _encoding);
                return(h);
            }
예제 #3
0
 public override void hashInit(ref int h)
 {
     base.hashInit(ref h);
     HashUtil.hashAdd(ref h, _mcastInterface);
     HashUtil.hashAdd(ref h, _mcastTtl);
     HashUtil.hashAdd(ref h, _connect);
     HashUtil.hashAdd(ref h, _compress);
 }
예제 #4
0
        private void calcHashValue()
        {
            int h = 5381;

            HashUtil.hashAdd(ref h, _type);
            HashUtil.hashAdd(ref h, _rawEncoding);
            HashUtil.hashAdd(ref h, _rawBytes);
            _hashCode = h;
        }
예제 #5
0
 public virtual void hashInit(ref int h)
 {
     HashUtil.hashAdd(ref h, host_);
     HashUtil.hashAdd(ref h, port_);
     if (sourceAddr_ != null)
     {
         HashUtil.hashAdd(ref h, sourceAddr_);
     }
     HashUtil.hashAdd(ref h, connectionId_);
 }
예제 #6
0
 public override int GetHashCode()
 {
     if (!_hashInitialized)
     {
         _hashValue = 5381;
         HashUtil.hashAdd(ref _hashValue, type());
         hashInit(ref _hashValue);
         _hashInitialized = true;
     }
     return(_hashValue);
 }
예제 #7
0
파일: TcpConnector.cs 프로젝트: zk2013/ice
        //
        // Only for use by TcpEndpoint
        //
        internal TcpConnector(ProtocolInstance instance, EndPoint addr, NetworkProxy proxy, EndPoint sourceAddr,
                              int timeout, string connectionId)
        {
            _instance     = instance;
            _addr         = addr;
            _proxy        = proxy;
            _sourceAddr   = sourceAddr;
            _timeout      = timeout;
            _connectionId = connectionId;

            _hashCode = 5381;
            HashUtil.hashAdd(ref _hashCode, _addr);
            if (_sourceAddr != null)
            {
                HashUtil.hashAdd(ref _hashCode, _sourceAddr);
            }
            HashUtil.hashAdd(ref _hashCode, _timeout);
            HashUtil.hashAdd(ref _hashCode, _connectionId);
        }
예제 #8
0
        //
        // Only for use by UdpEndpointI
        //
        internal UdpConnector(ProtocolInstance instance, EndPoint addr, EndPoint sourceAddr, string mcastInterface,
                              int mcastTtl, string connectionId)
        {
            _instance       = instance;
            _addr           = addr;
            _sourceAddr     = sourceAddr;
            _mcastInterface = mcastInterface;
            _mcastTtl       = mcastTtl;
            _connectionId   = connectionId;

            _hashCode = 5381;
            HashUtil.hashAdd(ref _hashCode, _addr);
            if (sourceAddr != null)
            {
                HashUtil.hashAdd(ref _hashCode, _sourceAddr);
            }
            HashUtil.hashAdd(ref _hashCode, _mcastInterface);
            HashUtil.hashAdd(ref _hashCode, _mcastTtl);
            HashUtil.hashAdd(ref _hashCode, _connectionId);
        }
예제 #9
0
 public override void hashInit(ref int h)
 {
     base.hashInit(ref h);
     HashUtil.hashAdd(ref h, _timeout);
     HashUtil.hashAdd(ref h, _compress);
 }