public static void Main(string[] args) { using (var context = ZmqContext.Create()) { using (var queue = new ZeroMQ.Devices.QueueDevice(context, "tcp://*:5559", "tcp://*:5560")) { } } }
public static void Main(string[] args) { using (var context = ZmqContext.Create()) { using (var queue = new ZeroMQ.Devices.QueueDevice(context, "tcp://*:5559", "tcp://*:5560")) { } } }
public static void Main(string[] args) { using (var context = ZmqContext.Create()) { using (var queue = new ZeroMQ.Devices.QueueDevice(context, "tcp://*:5555", "inproc://workers")) { var workerThreads = new Thread[5]; for (int threadId = 0; threadId < workerThreads.Length; threadId++) { workerThreads[threadId] = new Thread(WorkerRoutine); workerThreads[threadId].Start(context); } } } }
private void SendReceiveWithDevice() { using (var broker = new ZeroMQ.Devices.QueueDevice(this.zmqContext, this.frontendAddress, this.backendAddress, ZeroMQ.Devices.DeviceMode.Blocking)) { try { broker.Start(); //while (Interlocked.Read(ref this.running) == 1) //{ //} } finally { broker.Stop(); } } }
private void SendReceiveWithDevice() { using (var broker = new ZeroMQ.Devices.QueueDevice(this.zmqContext, this.frontendAddress, this.backendAddress, ZeroMQ.Devices.DeviceMode.Blocking)) { try { broker.Start(); //while (Interlocked.Read(ref this.running) == 1) //{ //} } finally { broker.Stop(); } } }