mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	Issue #21566: Make use of socket.listen() default backlog.
This commit is contained in:
		
							parent
							
								
									8518b79a8d
								
							
						
					
					
						commit
						6e20460dc6
					
				
					 18 changed files with 33 additions and 33 deletions
				
			
		|  | @ -243,14 +243,14 @@ def testRecvTimeout(self): | |||
|     def testAcceptTimeout(self): | ||||
|         # Test accept() timeout | ||||
|         support.bind_port(self.sock, self.localhost) | ||||
|         self.sock.listen(5) | ||||
|         self.sock.listen() | ||||
|         self._sock_operation(1, 1.5, 'accept') | ||||
| 
 | ||||
|     def testSend(self): | ||||
|         # Test send() timeout | ||||
|         with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as serv: | ||||
|             support.bind_port(serv, self.localhost) | ||||
|             serv.listen(5) | ||||
|             serv.listen() | ||||
|             self.sock.connect(serv.getsockname()) | ||||
|             # Send a lot of data in order to bypass buffering in the TCP stack. | ||||
|             self._sock_operation(100, 1.5, 'send', b"X" * 200000) | ||||
|  | @ -259,7 +259,7 @@ def testSendto(self): | |||
|         # Test sendto() timeout | ||||
|         with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as serv: | ||||
|             support.bind_port(serv, self.localhost) | ||||
|             serv.listen(5) | ||||
|             serv.listen() | ||||
|             self.sock.connect(serv.getsockname()) | ||||
|             # The address argument is ignored since we already connected. | ||||
|             self._sock_operation(100, 1.5, 'sendto', b"X" * 200000, | ||||
|  | @ -269,7 +269,7 @@ def testSendall(self): | |||
|         # Test sendall() timeout | ||||
|         with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as serv: | ||||
|             support.bind_port(serv, self.localhost) | ||||
|             serv.listen(5) | ||||
|             serv.listen() | ||||
|             self.sock.connect(serv.getsockname()) | ||||
|             # Send a lot of data in order to bypass buffering in the TCP stack. | ||||
|             self._sock_operation(100, 1.5, 'sendall', b"X" * 200000) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Charles-François Natali
						Charles-François Natali