SetName() public method

Set Name (the public name of this node)
public SetName ( string name ) : void
name string the name to set
return void
コード例 #1
0
ファイル: MainForm.cs プロジェクト: NetMQ/Zyre
 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;
 }