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); } }
/// <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); }
/// <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); }
/// <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(); }
/// <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++; }
/// <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); }
/// <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); }
/// <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); }