public void HandleRpc(ISender caller, string method, IList args, object rs)
{
if(method.Equals("Sync")) {
TunnelEdge te = (caller as ReqrepManager.ReplyState).ReturnPath as TunnelEdge;
if(te == null) {
throw new Exception(String.Format(
"{0} must be called from a TunnelEdge.", method));
}
IDictionary dict = args[0] as IDictionary;
if(dict == null) {
throw new Exception(method + "\'s parameter is an IDictionary!");
}
UpdateNeighborIntersection(te, dict);
_node.Rpc.SendResult(rs, true);
} else if(method.Equals("RequestSync")) {
_node.Rpc.SendResult(rs, _ito.GetSyncMessage(null, _node.Address, _connections));
} else {
throw new Exception(String.Format("No such method: {0}.", method));
}
}