-function rpc.call(node,call)
- --init_nodes();
- func = "empty"
- arg = "empty"
- mailbox = node
-
- if type(call) == "table" then
- func = call[1]
- arg = call[2]
- end
- task_call = simgrid.Task.new("splay_task",10000,10000);
- task_call['func_call_name'] = func;
- task_call['func_call_arg'] = arg;
- --log:print("Sending Task to mailbox "..mailbox.." to call "..func.." with arg "..arg);
- simgrid.Task.iSend(task_call,mailbox);
- call_function(func,arg)
-end
+function rpc.call(node, call)
+ --init_nodes();
+ func = "empty"
+ arg = "empty"
+ mailbox = node
+
+ if type(node) == "table" then
+ mailbox = node.ip..":"..node.port
+ end
+
+ if type(call) == "table" then
+ func = call[1]
+ arg = call[2]
+ end
+ task_call = simgrid.Task.new("splay_task", 10000, 10000)
+ task_call['func_call_name'] = func
+ task_call['func_call_arg'] = arg
+ log:print("Sending Task to mailbox "..mailbox.." to call '"..func.."' with arg '"..arg.."'")
+ simgrid.Task.send(task_call, mailbox)
+
+end
+
+function rpc.server(port)
+ -- nothing really to do : no need to open Socket since it's a Simulation
+end