Exemplo n.º 1
0
        protected override void XAttachPipe(Pipe pipe, bool icanhasall)
        {
            Debug.Assert(pipe != null);

            bool identityOk = IdentifyPeer(pipe);

            if (identityOk)
            {
                m_fairQueueing.Attach(pipe);
            }
            else
            {
                m_anonymousPipes.Add(pipe);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Register the pipe with this socket.
        /// </summary>
        /// <param name="pipe">the Pipe to attach</param>
        /// <param name="icanhasall">not used</param>
        protected override void XAttachPipe(Pipe pipe, bool icanhasall)
        {
            Debug.Assert(pipe != null);

            IdentifyPeer(pipe);
            m_fairQueueing.Attach(pipe);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Register the pipe with this socket.
        /// </summary>
        /// <param name="pipe">the Pipe to attach</param>
        /// <param name="icanhasall">not used</param>
        protected override void XAttachPipe(Pipe pipe, bool icanhasall)
        {
            Assumes.NotNull(pipe);

            IdentifyPeer(pipe);
            m_fairQueueing.Attach(pipe);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Register the pipe with this socket.
        /// </summary>
        /// <param name="pipe">the Pipe to attach</param>
        /// <param name="icanhasall">not used</param>
        protected override void XAttachPipe(Pipe pipe, bool icanhasall)
        {
            Assumes.NotNull(pipe);
            m_fairQueueing.Attach(pipe);
            m_distribution.Attach(pipe);

            // Send all the cached subscriptions to the new upstream peer.
            m_subscriptions.Apply(s_sendSubscription, pipe);
            pipe.Flush();
        }
Exemplo n.º 5
0
        /// <summary>
        /// Register the pipe with this socket.
        /// </summary>
        /// <param name="pipe">the Pipe to attach</param>
        /// <param name="icanhasall">not used</param>
        protected override void XAttachPipe(Pipe pipe, bool icanhasall)
        {
            Debug.Assert(pipe != null);

            byte[] routingId = BitConverter.GetBytes(m_nextPeerId);

            pipe.RoutingId = routingId;
            m_outpipes.Add(routingId, new Outpipe(pipe, true));
            m_fairQueueing.Attach(pipe);

            // As this exposed to the user we make a copy to avoid an issue
            m_options.LastPeerRoutingId = BitConverter.GetBytes(m_nextPeerId);

            m_nextPeerId++;
        }
Exemplo n.º 6
0
        /// <summary>
        /// Register the pipe with this socket.
        /// </summary>
        /// <param name="pipe">the Pipe to attach</param>
        /// <param name="icanhasall">not used</param>
        protected override void XAttachPipe(Pipe pipe, bool icanhasall)
        {
            uint routingId = m_nextRoutingId++;

            if (routingId == 0)
            {
                routingId = m_nextRoutingId++; //  Never use Routing ID zero
            }
            pipe.RoutingId = routingId;
            //  Add the record into output pipes lookup table
            var outpipe = new Outpipe(pipe, true);

            m_outpipes.Add(routingId, outpipe);

            m_fairQueueing.Attach(pipe);
        }
Exemplo n.º 7
0
 /// <summary>
 /// Register the pipe with this socket.
 /// </summary>
 /// <param name="pipe">the Pipe to attach</param>
 /// <param name="icanhasall">not used</param>
 protected override void XAttachPipe(Pipe pipe, bool icanhasall)
 {
     Debug.Assert(pipe != null);
     m_fairQueueing.Attach(pipe);
     m_loadBalancer.Attach(pipe);
 }
Exemplo n.º 8
0
 /// <summary>
 /// Register the pipe with this socket.
 /// </summary>
 /// <param name="pipe">the Pipe to attach</param>
 /// <param name="icanhasall">not used</param>
 protected override void XAttachPipe(Pipe pipe, bool icanhasall)
 {
     Assumes.NotNull(pipe);
     m_fairQueueing.Attach(pipe);
     m_loadBalancer.Attach(pipe);
 }