if hasattr(rm, "create_port"):
connected[position] = rm
position += 1
- elif hasattr(rm, "udp_connect_command"):
+ elif hasattr(rm, "udp_connect"):
connected[1] = rm
return connected
remote_ip = socket.gethostbyname(rm_node.get("hostname"))
# Collect info from endpoint
- local_port_file = os.path.join(self.run_home(local_node), "local_port")
- rem_port_file = os.path.join(self.run_home(local_node), "remote_port")
- ret_file = os.path.join(self.run_home(local_node), "ret_file")
+ connection_run_home = self.run_home(local_node)
+ connection_app_home = self.app_home(local_node)
cipher = self.get("cipher")
cipher_key = self.get("cipherKey")
bwlimit = self.get("bwLimit")
txqueuelen = self.get("txQueueLen")
- rem_port = str(self.get_port_info(rm_endpoint,local_endpoint))
-
+
# Upload the remote port in a file
+ rem_port = str(self.get_port_info(rm_endpoint,local_endpoint))
+ rem_port_file = os.path.join(self.run_home(local_node), "remote_port")
local_node.upload(rem_port, rem_port_file,
text = True,
overwrite = False)
- connect_command = local_endpoint.udp_connect_command(
- remote_ip, local_port_file, rem_port_file,
- ret_file, cipher, cipher_key, bwlimit, txqueuelen)
+ self._pid, self._ppid = local_endpoint.udp_connect(
+ rm_node, connection_run_home, connection_app_home,
+ cipher, cipher_key, bwlimit, txqueuelen)
+
+
+# connect_command = local_endpoint.udp_connect_command(
+# remote_ip, local_port_file, rem_port_file,
+# ret_file, cipher, cipher_key, bwlimit, txqueuelen)
- self.connection_command(connect_command, local_node, rm_node)
+# self.connection_command(connect_command, local_node, rm_node)
- # Wait for pid file to be generated
- self._pid, self._ppid = local_node.wait_pid(self.run_home(local_node))
+# # Wait for pid file to be generated
+# self._pid, self._ppid = local_node.wait_pid(self.run_home(local_node))
if not self._pid or not self._ppid:
(out, err), proc = local_node.check_errors(self.run_home(local_node))