public Pull([NotNull] Ctx parent, int threadId, int socketId) : base(parent, threadId, socketId) { m_options.SocketType = ZmqSocketType.Pull; m_fairQueueing = new FairQueueing(); }
/// <summary> /// Create a new Dealer socket that holds the prefetched message. /// </summary> public Dealer([NotNull] Ctx parent, int threadId, int socketId) : base(parent, threadId, socketId) { m_prefetched = false; m_options.SocketType = ZmqSocketType.Dealer; m_fairQueueing = new FairQueueing(); m_loadBalancer = new LoadBalancer(); m_options.RecvIdentity = true; m_prefetchedMsg = new Msg(); m_prefetchedMsg.InitEmpty(); }
public XSub([NotNull] Ctx parent, int threadId, int socketId) : base(parent, threadId, socketId) { m_options.SocketType = ZmqSocketType.Xsub; m_hasMessage = false; m_more = false; m_options.Linger = 0; m_fairQueueing = new FairQueueing(); m_distribution = new Distribution(); m_subscriptions = new Trie(); m_message = new Msg(); m_message.InitEmpty(); }
public Stream([NotNull] Ctx parent, int threadId, int socketId) : base(parent, threadId, socketId) { m_prefetched = false; m_identitySent = false; m_currentOut = null; m_moreOut = false; m_nextPeerId = s_random.Next(); m_options.SocketType = ZmqSocketType.Stream; m_fairQueueing = new FairQueueing(); m_prefetchedId = new Msg(); m_prefetchedId.InitEmpty(); m_prefetchedMsg = new Msg(); m_prefetchedMsg.InitEmpty(); m_outpipes = new Dictionary<byte[], Outpipe>(new ByteArrayEqualityComparer()); m_options.RawSocket = true; }
/// <summary> /// Create a new Router instance with the given parent-Ctx, thread-id, and socket-id. /// </summary> /// <param name="parent">the Ctx that will contain this Router</param> /// <param name="threadId">the integer thread-id value</param> /// <param name="socketId">the integer socket-id value</param> public Router([NotNull] Ctx parent, int threadId, int socketId) : base(parent, threadId, socketId) { m_nextPeerId = s_random.Next(); m_options.SocketType = ZmqSocketType.Router; m_fairQueueing = new FairQueueing(); m_prefetchedId = new Msg(); m_prefetchedId.InitEmpty(); m_prefetchedMsg = new Msg(); m_prefetchedMsg.InitEmpty(); m_anonymousPipes = new HashSet<Pipe>(); m_outpipes = new Dictionary<byte[], Outpipe>(new ByteArrayEqualityComparer()); m_options.RecvIdentity = true; }