mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	Add a comment explaining why SocketIO is needed
This commit is contained in:
		
							parent
							
								
									f77c1d6adb
								
							
						
					
					
						commit
						872b79d02f
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		|  | @ -228,6 +228,13 @@ class SocketIO(io.RawIOBase): | |||
|     the raw I/O interface on top of a socket object. | ||||
|     """ | ||||
| 
 | ||||
|     # One might wonder why not let FileIO do the job instead.  There are two | ||||
|     # main reasons why FileIO is not adapted: | ||||
|     # - it wouldn't work under Windows (where you can't used read() and | ||||
|     #   write() on a socket handle) | ||||
|     # - it wouldn't work with socket timeouts (FileIO would ignore the | ||||
|     #   timeout and consider the socket non-blocking) | ||||
| 
 | ||||
|     # XXX More docs | ||||
| 
 | ||||
|     def __init__(self, sock, mode): | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Antoine Pitrou
						Antoine Pitrou