Uuid() public method

Return our node UUID string, after successful initialization
public Uuid ( ) : System.Guid
return System.Guid
Example #1
0
 public MainForm(string name)
 {
     InitializeComponent();
     btnStop.Enabled = false;
     _connectedPeers = new List<Peer>();
     peerBindingSource.DataSource = _connectedPeers;
     _ownGroups = new List<Group>();
     ownGroupBindingSource.DataSource = _ownGroups;
     _peerGroups = new List<Group>();
     peerGroupBindingSource.DataSource = _peerGroups;
     _headersByPeerGuid = new Dictionary<Guid, List<Header>>();
     _zyre = new Zyre(_name, true, NodeLogger);
     if (!string.IsNullOrEmpty(name))
     {
         _zyre.SetName(name);
     }
     _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;
 }
Example #2
0
        public void StartZyre()
        {
            lock (_sync)
            {
                _zyre = new NetMQ.Zyre.Zyre(Name, true, Log);
                //_zyre.Socket.ReceiveReady += ReceiveFromRemote;

                _zyre.EnterEvent   += _zyre_EnterEvent;
                _zyre.ShoutEvent   += _zyre_ShoutEvent;
                _zyre.WhisperEvent += _zyre_WhisperEvent;

                //_poller.Add(_zyre.Socket);

                _zyre.Join("ZST");
                _zyre.Start();
                _zyre.Peers();

                //CheckPolling();

                _uuid = _zyre.Uuid();
            }
        }