Whats the purporse of using makefile() when working with Python Sockets??
I can make a program works just with send() and recv() functions on Python. But i read that is better to use the makefile() method to buffer the data. I didn’t understand this relation and differences…any help?
Tks !
You can use
makefileif you find the file interface of Python convenient. For example, you can then use methods likereadlineson the socket (you’d have to implement it manually when usingrecv). This can be more convenient if sending text data on the socket, but YMMV.