CreateRouterSocket() 개인적인 메소드

private CreateRouterSocket ( ) : RouterSocket
리턴 RouterSocket
예제 #1
0
        /// <summary>
        /// Initializes an instance of a NetMQReceiverManager, constructs a NetMQReceiver from the specified NetMQContext and binds
        /// it to the specified address
        /// </summary>
        /// <param name="context">NetMQContext</param>
        /// <param name="address">Address to connect the NetMQReceiver to</param>
        public NetMQReceiverManager(NetMQContext context, string address)
        {
            if (context == null)
                throw new ArgumentNullException("NetMQContext");

            receiver = new NetMQReceiver(context.CreateRouterSocket(), new BinarySerializer());
			receiver.Bind(address);
        }
예제 #2
0
파일: MDPBroker.cs 프로젝트: romanros/netmq
 /// <summary>
 ///     ctor initializing all local variables
 ///     <para>DEFAULTS:</para>
 ///     <para>heartbeat interval 2,500ms</para>
 ///     <para>max retries for waiting on heartbeats 3 times</para>
 /// </summary>
 private MDPBroker ()
 {
     m_ctx = NetMQContext.Create ();
     Socket = m_ctx.CreateRouterSocket ();
     m_services = new List<Service> ();
     m_knownWorkers = new List<Worker> ();
     m_heartbeatInterval = TimeSpan.FromMilliseconds (2500); // otherwise the expiry would be 0(!)
     HeartbeatLiveliness = 3;                    // so m_heartbeatExpiry = value * m_heartbeatInterval = 7.500 ms
     m_isBound = false;
 }
예제 #3
0
 /// <summary>
 ///     ctor initializing all local variables
 /// </summary>
 private MDPBroker ()
 {
     m_ctx = NetMQContext.Create ();
     Socket = m_ctx.CreateRouterSocket ();
     m_services = new List<Service> ();
     m_knownWorkers = new List<Worker> ();
     HeartbeatLiveliness = 3;
     m_isBound = false;
 }