[Python-Dev] Iterable sockets?

Skip Montanaro skip@pobox.com
Thu, 13 Mar 2003 21:03:58 -0600


    >> Um, why doesn't the makefile() method do what you want?

    Andrew> The short answer is that it does, but not very tidily - by
    Andrew> turning the socket object into a file object, I lose the
    Andrew> original socket object functionality (for example, shutdown()).

Would it be sufficient for the close() method on the object returned by
sock.makefile() to call shutdown(2) on the underlying socket?

Skip