diff --git a/config/topo/topo_1_1 b/config/topo/topo_basicquic similarity index 64% rename from config/topo/topo_1_1 rename to config/topo/topo_basicquic index 0fb8774..eaa5f59 100644 --- a/config/topo/topo_1_1 +++ b/config/topo/topo_basicquic @@ -1,5 +1,5 @@ -clients:5 +clients:1 leftSubnet:10.0. rightSubnet:10.1. -path_c2r_0:10,10,4,10 +path_c2r_0:10,10,4,0 topoType:IoTMultiClient diff --git a/experiments/basicquic.py b/experiments/basicquic.py index 693467a..abfcf09 100644 --- a/experiments/basicquic.py +++ b/experiments/basicquic.py @@ -27,10 +27,10 @@ class BASICQUIC(RandomFileExperiment): BASICQUIC.SERVER_LOG) def getHTTPSServerCmd(self): - # s = "{}/../utils/server".format( - # os.path.dirname(os.path.abspath(__file__))) - s = "/home/mininet/pugit/sample/minitopo/utils/server & > {}".format( - BASICQUIC.SERVER_LOG) + s = "{}/../utils/basicquic-server & > {}".format( + os.path.dirname(os.path.abspath(__file__)), BASICQUIC.SERVER_LOG) + # s = "/home/mininet/pugit/sample/minitopo/utils/server & > {}".format( + # BASICQUIC.SERVER_LOG) print(s) return s @@ -39,15 +39,14 @@ class BASICQUIC(RandomFileExperiment): # s = "ping -c 3 -I {} {} > ping-result".format( # "10.0.0.", self.topo_config.get_client_ip(1)) - # s = "{}/../utils/echo-client {} > {}".format(os.path.dirname(os.path.abspath(__file__)), - # self.topo.get_server_ip( - # 0), - # os.path.dirname(os.path.abspath(__file__)), BASICQUIC.CLIENT_LOG) + s = "{}/../utils/basicquic-client -keylog router.log -insecure https://{}:6121/demo/tiles".format( + os.path.dirname(os.path.abspath(__file__)), + self.topo_config.get_server_ip(0)) - s = "/home/mininet/pugit/sample/minitopo/utils/echo-client {} & > {}".format( - self.topo_config.get_server_ip(0), - BASICQUIC.CLIENT_LOG, - ) + # s = "/home/mininet/pugit/sample/minitopo/utils/echo-client {} & > {}".format( + # self.topo_config.get_server_ip(0), + # BASICQUIC.CLIENT_LOG, + # ) print(s) return s @@ -75,14 +74,22 @@ class BASICQUIC(RandomFileExperiment): cmd = self.getHTTPSClientCmd() # for c in self.topo_config.clients: # self.topo.command_to(c, cmd) - for i in range(1, self.topo.client_count()): + + def runner(i): self.topo.command_to(self.topo_config.clients[i], cmd) + print('client {} start'.format(i)) + + for i in range(1, self.topo.client_count()): + t = threading.Thread(target=runner, args=(i,)) + t.start() # self.topo_config.configure_client(i) + self.topo.command_to(self.topo_config.client, "sleep 20") + self.topo.command_to(self.topo_config.server, "netstat -sn > netstat_server_after") self.topo.command_to(self.topo_config.router, "netstat -sn > netstat_router_after") self.topo.command_to(self.topo_config.server, - "pkill -f server") + "pkill -f basicquic-server") self.topo.command_to(self.topo_config.client, "sleep 2") diff --git a/utils/basicquic-client b/utils/basicquic-client new file mode 100755 index 0000000..9fb3be3 Binary files /dev/null and b/utils/basicquic-client differ diff --git a/utils/basicquic-server b/utils/basicquic-server new file mode 100755 index 0000000..fe9a388 Binary files /dev/null and b/utils/basicquic-server differ