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