Ejemplo n.º 1
0
        public DedicatedMessageSender(Alachisoft.NCache.Common.DataStructures.Queue mq, ConnectionTable.Connection connection, object syncLockObj, ILogger NCacheLog, bool onPrimaryNIC, bool doNaggling, int naglingSize)

        {
            this.mq = mq;
            this.peerConnection = connection;
            if (connection != null)
            {
                string primary = connection.IsPrimary ? "p" : "s";
                string primaryNIC = onPrimaryNIC ? "p" : "s";
                Name = "DmSender - " + connection.peer_addr.ToString() + " - " + primary + primaryNIC;

            }

            perfStatsCollector = peerConnection.Enclosing_Instance.enclosingInstance.Stack.perfStatsColl;

            IsBackground = true;
            sync_lock = syncLockObj;
            _ncacheLog = NCacheLog;
            isNagglingEnabled = doNaggling;
            nagglingSize = naglingSize;
            if (nagglingSize + 8 > sendBufferSize) sendBufferSize = nagglingSize + 8;
            sendBuffer = new byte[sendBufferSize];
        }
Ejemplo n.º 2
0
 public void UpdateConnection(ConnectionTable.Connection newCon)
 {
     peerConnection = newCon;
 }