Example #1
0
 def start_server(self, protocol='TCP', port=5001, mss=None, window=None):
     """iperf -s -D --mss mss
     """
     cmd = ['iperf', '-s', '-p', str(port)]
     if not cmp(protocol, 'UDP'):
         cmd.append('-u')
     if mss:
         cmd.extend(['-M', str(mss)])
     if window:
         cmd.extend(['-w', str(window)])
     pid = utils.create_deamon(cmd)
     data = dict()
     data['pid'] = pid
     return data
Example #2
0
 def start_server(self, protocol='TCP', port=5001, mss=None, window=None):
     """iperf -s -D --mss mss
     """
     cmd = ['iperf', '-s', '-p', str(port)]
     if not cmp(protocol, 'UDP'):
         cmd.append('-u')
     if mss:
         cmd.extend(['-M', str(mss)])
     if window:
         cmd.extend(['-w', str(window)])
     pid = utils.create_deamon(cmd)
     data = dict()
     data['pid'] = pid
     return data
Example #3
0
 def test_create_deamon(self):
     cmd = ["ls", self.test_file]
     pid = utils.create_deamon(cmd)
     self.pids.append(pid)
     self.assertEqual(type(pid), types.IntType)
Example #4
0
 def test_create_deamon(self):
     cmd = ["ls", self.test_file]
     pid = utils.create_deamon(cmd)
     self.pids.append(pid)
     self.assertEqual(type(pid), types.IntType)