def listener():
     s = socket.socket()
     PORT[0] = test_support.bind_port(s, '', PORT[0])
     s.listen(5)
     listener_ready.set()
     s.accept()
     s = None # reclaim the socket object, which also closes it
     listener_gone.set()
Esempio n. 2
0
 def listener():
     s = socket.socket()
     PORT[0] = test_support.bind_port(s, '', PORT[0])
     s.listen(5)
     listener_ready.set()
     s.accept()
     s = None  # reclaim the socket object, which also closes it
     listener_gone.set()
Esempio n. 3
0
 def setUp(self):
     self.serv = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
     self.serv.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
     global PORT
     PORT = test_support.bind_port(self.serv, HOST, PORT)
Esempio n. 4
0
 def setUp(self):
     self.serv = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
     self.serv.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
     global PORT
     PORT = test_support.bind_port(self.serv, HOST, PORT)