Zyre
C# Implementation of ZeroMQ Realtime Exchange Protocol, based on NetMQ
Install / Use
/learn @NetMQ/ZyreREADME
NetMQ.Zyre
Zyre does local area discovery and clustering. A Zyre node broadcasts UDP beacons, and connects to peers that it finds. This class wraps a Zyre node with a message-based API.
NetMQ.Zyre is the C# implementation of the ZeroMQ RealMQ Realtime Exchange Protocol found at http://rfc.zeromq.org/spec:36. Other implementations exist for C, Java, Python and more. This is version 2, not the first version (from http://rfc.zeromq.org/spec:20).
This C# implementation is based primarily on the C zeromq/zyre implementation at https://github.com/zeromq/zyre ...but there is no implementation using the zgossip capability in czmq.
This C# implementation offers an optional Event-based subscription to messages from peers. See Zyre.cs.
Installation
Coming soon. ~~You can download NetMQ via~~ ~~NuGet~~~~.~~
Dependencies
The only dependency is NetMQ. You can download NetMQ via NuGet.
This project targets .Net 4, but it uses C# 6.0.
Using / Documentation
This project assumes you have some familiarity with NetMQ.
Before using NetMQ, make sure to read the ZeroMQ Guide.
The NetMQ documentation can be found at netmq.readthedocs.org.
The SamplePeer project under the Samples directory demonstrates the features supported by Zyre. To run several instances at once, run a batch file like Run3SamplePeers.bat in the build directory.
Getting Started
_zyre = new Zyre(“Node1”, true);
_name = _zyre.Name();
_uuid = _zyre.Uuid();
_zyre.EnterEvent += ZyreEnterEvent;
_zyre.StopEvent += ZyreStopEvent;
_zyre.ExitEvent += ZyreExitEvent;
_zyre.EvasiveEvent += ZyreEvasiveEvent;
_zyre.JoinEvent += ZyreJoinEvent;
_zyre.LeaveEvent += ZyreLeaveEvent;
_zyre.WhisperEvent += ZyreWhisperEvent;
_zyre.ShoutEvent += ZyreShoutEvent;
Then handle the events and make calls to the Zyre API. For example:
_zyre.Join(“MyGroup”);
var peers = _zyre.Peers();
Who owns NetMQ.Zyre?
NetMQ.Zyre is owned by all its authors and contributors. This is an open source project licensed under the MPL 2.0. To contribute to NetMQ please read the C4.1 process, it's what we use. Contributors are welcome!
Related Skills
node-connect
351.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
