public static bool Init() { masterURL = "tcp://localhost:"+Constants.MASTER_PORT+"/"+Constants.MASTER_NAME; master = (iMaster)Activator.GetObject(typeof(iMaster), masterURL); currTransaction = null; KnownPadInts = new Dictionary<int, iServer>(); padIntsMap = new Dictionary<int, PadInt>(); temporaryPadInts = new Dictionary<int, PadInt>(); server = null; return true; }
//int actualNumberConections; public Server(string serverURL) { masterURL = "tcp://localhost:"+Constants.MASTER_PORT+"/"+Constants.MASTER_NAME; this.serverURL = serverURL; master = (iMaster)Activator.GetObject(typeof(iMaster), masterURL); padIntsMap = new Dictionary<int, ServerPadInt>(); tIdPadIntMap = new Dictionary<IdTransaction, ISet<int>>(); createdPadIntsMap = new Dictionary<int, ServerPadInt>(); freezed = false; freezedLock = new Object(); notFreezed = new AutoResetEvent(true); failed = false; primary = null; secundary = null; primaryURL = ""; secundaryURL = ""; pingData = new UpdateData(); allPingData = new UpdateData(); lastPingId = 0; pendingUpdates = new Dictionary<int,UpdateData>(); pingTimer = null; receivedPing = true; }