public void Remove(string key, string value) { BigInteger keyID = new BigInteger(ChordNode.SHA(key)); NodeInfo ni = ChordModule.Instance.NodeInstance.FindSuccessor(keyID); ChordNodeProxy obj = (ChordNodeProxy)Activator.GetObject(typeof(ChordNodeProxy), ni.Address + ":" + ni.Port + "/ChordServices"); if (obj != null) { try { obj.Remove(keyID, value); } catch (IOException) { } catch (SocketException) { } } }
public List <string> Get(string key) { BigInteger keyID = new BigInteger(ChordNode.SHA(key)); NodeInfo ni = ChordModule.Instance.NodeInstance.FindSuccessor(keyID); ChordNodeProxy obj = (ChordNodeProxy)Activator.GetObject(typeof(ChordNodeProxy), ni.Address + ":" + ni.Port + "/ChordServices"); if (obj != null) { try { return(obj.Get(keyID)); } catch (IOException) { } catch (SocketException) { } } return(null); }