示例#1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ForwarderDevice"/> class.
 /// </summary>
 /// <param name="context">The <see cref="NetMQContext"/> to use when creating the sockets.</param>
 /// <param name="poller">The <see cref="Poller"/> to use.</param>
 /// <param name="frontendBindAddress">The endpoint used to bind the frontend socket.</param>
 /// <param name="backendBindAddress">The endpoint used to bind the backend socket.</param>
 /// <param name="mode">The <see cref="DeviceMode"/> for the device.</param>
 public ForwarderDevice(NetMQContext context, Poller poller, string frontendBindAddress, string backendBindAddress,
                        DeviceMode mode = DeviceMode.Threaded)
     : base(poller, context.CreateSubscriberSocket(), context.CreatePublisherSocket(), mode)
 {
     FrontendSetup.Bind(frontendBindAddress);
     BackendSetup.Bind(backendBindAddress);
 }
示例#2
0
 public StreamerDevice(NetMQContext context, string frontendBindAddress, string backendBindAddress,
                       DeviceMode mode = DeviceMode.Threaded)
     : base(context.CreatePullSocket(), context.CreatePushSocket(), mode)
 {
     FrontendSetup.Bind(frontendBindAddress);
     BackendSetup.Bind(backendBindAddress);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ForwarderDevice"/> class.
 /// </summary>
 /// <param name="poller">The <see cref="INetMQPoller"/> to use.</param>
 /// <param name="frontendBindAddress">The endpoint used to bind the frontend socket.</param>
 /// <param name="backendBindAddress">The endpoint used to bind the backend socket.</param>
 /// <param name="mode">The <see cref="DeviceMode"/> for the device.</param>
 public ForwarderDevice(INetMQPoller poller, string frontendBindAddress, string backendBindAddress,
                        DeviceMode mode = DeviceMode.Threaded)
     : base(poller, new SubscriberSocket(), new PublisherSocket(), mode)
 {
     FrontendSetup.Bind(frontendBindAddress);
     BackendSetup.Bind(backendBindAddress);
 }
示例#4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StreamerDevice"/> class.
 /// </summary>
 /// <param name="poller">The <see cref="INetMQPoller"/> to use.</param>
 /// <param name="frontendBindAddress">The endpoint used to bind the frontend socket.</param>
 /// <param name="backendBindAddress">The endpoint used to bind the backend socket.</param>
 /// <param name="mode">The <see cref="DeviceMode"/> for the device.</param>
 public StreamerDevice(INetMQPoller poller, string frontendBindAddress, string backendBindAddress,
                       DeviceMode mode = DeviceMode.Threaded)
     : base(poller, new PullSocket(), new PushSocket(), mode)
 {
     FrontendSetup.Bind(frontendBindAddress);
     BackendSetup.Bind(backendBindAddress);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ForwarderDevice"/> class.
 /// </summary>
 public PubSubDevice(ZContext context, string frontendBindAddr, string backendBindAddr)
     : base(context, FrontendType, BackendType)
 {
     FrontendSetup.Bind(frontendBindAddr);
     BackendSetup.Bind(backendBindAddr);
     BackendSetup.SubscribeAll();
 }
示例#6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="QueueDevice"/> class.
 /// </summary>
 /// <param name="context">The <see cref="NetMQContext"/> to use when creating the sockets.</param>
 /// <param name="poller">The <see cref="Poller"/> to use.</param>
 /// <param name="frontendBindAddress">The endpoint used to bind the frontend socket.</param>
 /// <param name="backendBindAddress">The endpoint used to bind the backend socket.</param>
 /// <param name="mode">The <see cref="DeviceMode"/> for the device.</param>
 public QueueDevice(NetMQContext context, Poller poller, string frontendBindAddress, string backendBindAddress,
                    DeviceMode mode = DeviceMode.Threaded)
     : base(poller, context.CreateRouterSocket(), context.CreateDealerSocket(), mode)
 {
     FrontendSetup.Bind(frontendBindAddress);
     BackendSetup.Bind(backendBindAddress);
 }
示例#7
0
 /// <summary>
 /// Configure the frontend and backend sockets and then Start this device.
 /// </summary>
 public void Initialize()
 {
     if (!m_isInitialized)
     {
         m_isInitialized = true;
         FrontendSetup.Configure();
         BackendSetup.Configure();
     }
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="StreamDealerDevice"/> class.
 /// </summary>
 public StreamDealerDevice(ZContext context, string frontendBindAddr, string backendBindAddr)
     : base(context, FrontendType, BackendType)
 {
     FrontendSetup.Bind(frontendBindAddr);
     BackendSetup.Bind(backendBindAddr);
 }
示例#9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="QueueDevice"/> class.
 /// </summary>
 /// <param name="frontendBindAddress">The endpoint used to bind the frontend socket.</param>
 /// <param name="backendBindAddress">The endpoint used to bind the backend socket.</param>
 /// <param name="mode">The <see cref="DeviceMode"/> for the device.</param>
 public QueueDevice(string frontendBindAddress, string backendBindAddress, DeviceMode mode = DeviceMode.Threaded)
     : base(new RouterSocket(), new DealerSocket(), mode)
 {
     FrontendSetup.Bind(frontendBindAddress);
     BackendSetup.Bind(backendBindAddress);
 }
示例#10
0
 public void Start()
 {
     FrontendSetup.Configure();
     BackendSetup.Configure();
     m_runner.Start();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="StreamerDevice"/> class.
 /// </summary>
 public PushPullDevice(ZContext context, string frontendBindAddr, string backendBindAddr)
     : base(context, FrontendType, BackendType)
 {
     FrontendSetup.Bind(frontendBindAddr);
     BackendSetup.Bind(backendBindAddr);
 }
示例#12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ForwarderDevice"/> class.
 /// </summary>
 /// <param name="context">The <see cref="ZmqContext"/> to use when creating the sockets.</param>
 /// <param name="frontendBindAddr">The address used to bind the frontend socket.</param>
 /// <param name="backendBindAddr">The endpoint used to bind the backend socket.</param>
 /// <param name="mode">The <see cref="DeviceMode"/> for the current device.</param>
 public ForwarderDevice(ZmqContext context, string frontendBindAddr, string backendBindAddr, DeviceMode mode)
     : this(context, mode)
 {
     FrontendSetup.Bind(frontendBindAddr);
     BackendSetup.Bind(backendBindAddr);
 }
示例#13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="QueueDevice"/> class that will run in a
 /// self-managed thread.
 /// </summary>
 /// <param name="context">The <see cref="ZmqContext"/> to use when creating the sockets.</param>
 /// <param name="frontendBindAddr">The endpoint used to bind the frontend socket.</param>
 /// <param name="backendBindAddr">The endpoint used to bind the backend socket.</param>
 public QueueDevice(ZmqContext context, string frontendBindAddr, string backendBindAddr)
     : this(context)
 {
     FrontendSetup.Bind(frontendBindAddr);
     BackendSetup.Bind(backendBindAddr);
 }
示例#14
0
 /// <summary>
 /// Initializes the frontend and backend sockets. Called automatically when starting the device.
 /// If called multiple times, will only execute once.
 /// </summary>
 public void Initialize()
 {
     FrontendSetup.Configure();
     BackendSetup.Configure();
 }