public Connection(Node owner, Configuration.Member remoteIdentifier) : base(owner) { this.owner = owner; this.RemoteIdentifier = remoteIdentifier; LastIncoming = DateTime.Now; serialLock = new DebugMutex("Consensus.Connection[" + RemoteIdentifier + "]"); }
public Interface(Configuration.Member self, Address selfAddress, Int3 myCoords, ThreadOperations threadOps, INotifiable notify, Action <Address> onAddressBound = null) : base(self) { Notify = notify; ThreadOps = threadOps; var cfg = BuildConfig(); if (!cfg.ContainsIdentifier(self)) { throw new ArgumentOutOfRangeException("Given self address is not contained by current SD configuration"); } Log.Message("Starting consensus with configuration " + cfg); actualPort = Start(cfg, selfAddress, onAddressBound); MyID = new ShardID(myCoords, self.Identifier); if (threadOps != ThreadOperations.Nothing) { gecThread = new Thread(new ThreadStart(GECThreadMain)); gecThread.Start(); } }
public Node(Configuration.Member self) : base(null) { MemberID = self; serialLock = new DebugMutex("Consensus.Node[" + self + "]"); }
public Connection(Node owner, Configuration.Member remoteIdentifier, TcpClient client) : this(owner, remoteIdentifier) { Assign(client, null); endPoint = client.Client.RemoteEndPoint; }
public ActiveConnection(Node owner, Configuration.Member remoteMember) : base(owner, remoteMember) { Connect(); }